New answers tagged

4

Your tileset is not ideal to use for autotiling, as many common pieces are missing, for example the L shape. I modified the tileset and used 160x160 wide tiles, this is the result: The blue checkerboard means that the cell is ignored, so it could be either filled or empty.


1

Yes, this is perfectly valid use of export and PackedScene. In fact, you can do this with any Resource (please notice you use a ResourceLoader not a "SceneLoader"). The Resource type has support for serialization and deserialización out of the box. See When and how to avoid using nodes for everything. When the game starts it has to load (and ...


4

Multiple cameras Have multiple Camera2D. Then on the handler for "body_entered" signal of your Area2D you can set Camera.current = true for the Camera2D of the next room (areas of the map). And set current to false for the prior camera. Alright, if you are going to have references to the cameras in your script, you may instead export some NodePaths ...


0

There exists an addon on the asset store that can import .vox files directly, no exporting needed: https://godotengine.org/asset-library/asset/162 Regarding the high poly count, I'd say that you can always optimize later if it becomes an issue.


4

Sadly, there is no built in to do this at the time of writing. Instead this is what exists: A bug report: Getting depth texture from viewports. A proposal: Accessing different viewport buffers through ViewportTextures. Feel free to upvote it, and comment why you need it in your project. And a pull request to add this feature: Add access to the viewport's G-...


2

For your Viewport to get input, it must be inside a ViewportContainer. Thus, if you want the inner Viewport to receive input, you must put it inside a new ViewportContainer (it can have no size, or be invisible, input should still work). The alternative is, of course, to manipulate the Viewport from an script located elsewhere where it can get input. By the ...


2

First of all, I want to say, I sympathize. I have gone down the path of making a custom variation of a Node by composition and turning it into a scene and then having to rely on reaching deep into the structure to use it. And I have also implemented property delegates for ease of use. The current Godot response is Editable Children. You can instance a scene ...


1

I'm not sure I understand your limitations, so I will give you a few approaches, and hopefully this gets you to the solution along the way. This is not an exhaustive list. Pickable Object If you have a CollisionObject (e.g. the board), you can set input_ray_pickable to true on it. Then connect the input_event signal or override the _input_event method, ...


1

Transparency can be very costly on low end devices because the game has to do a lot of work to draw things in the right order (which obviously means more video memory). Of course it depends on the number and size of your objects so you'll have to test it to find out for sure. Although a Chroma key solution would be more complicated so it's going to be a ...


1

There will be a shader in charge of displaying the sprites. This shader will have the logic to handle either the chroma key or the alpha channel. If you use alpha channel, you will need to send more data to the GPU (the alpha channel). However, you wouldn't be sending the textures every frame, instead you send them on load and reuse them. Thus, the ...


Top 50 recent answers are included