Questions tagged [godot]
Godot is a 2D and 3D open source game engine developed by the Godot Engine community. It features a built-in development environment which runs on Windows, macOS and Linux and can create games targeting PC, mobile and web platforms.
656 questions
0
votes
1
answer
70
views
Decelerating player's momentum without changing direction
I'm adding deceleration to my player character, decreasing their velocity over time when the player releases the direction keys.
With the code below, at non-perfect angles, the character seems to re-...
0
votes
0
answers
18
views
Active ragdoll in Godot 4.5: how to achieve good results?
I'm working on a 2.5D game in Godot 4.5 that uses skeletal animation + ragdoll physics.
I'm really happy with how the full ragdoll mode behaves, but I can't get anything close to a good active ragdoll ...
0
votes
1
answer
41
views
Capsule collision sticking in mirrored section of level
I have a problem with importing a 3D model from Blender into Godot 4. I created my apartment model in Blender and exported it as a .glb file into Godot 4.5. I generate the CollisionShape3D using Mesh →...
0
votes
1
answer
140
views
How to make enemies spawn off-screen in Godot 4.5?
I am trying to make a game using Godot 4.5 where enemies spawn off-screen, but I faced this bug where they spawn on-screen instead:
The white squares are the spawned enemies and the red is the player....
0
votes
0
answers
22
views
Can Godot's AnimationTree blend multiple skeletons using Animation Playback Tracks?
I have a setup in Godot with two different skeletons for male and female models. The skeletons are different because the proportions are different, but I want to use the same animations on both.
Both ...
0
votes
1
answer
169
views
Spawn enemy in empty space
I'm new to Godot and following a tutorial, which spawns enemies randomly. However, I'm trying to improve on this by checking that the enemies don't spawn on top of the player and cause an instant loss....
1
vote
3
answers
247
views
Enemy movement system on a 2D grid (Zelda-like)
I’m trying to implement a top-down Zelda-like enemy movement system. Consider a screen of x tiles wide by y tiles tall, each tile being 16x16 pixels.
I’m not asking for code here. I’m asking for ...
2
votes
1
answer
110
views
Why isn't my control anchored to the top left of the screen
I have this simple scene based on a Control Node and a few containers, note how the UI elements are anchored to the top left of the screen:
When I put it into another scene, it looks like this:
I ...
0
votes
1
answer
189
views
Can I reference resource UIDs in save files
In Godot 4.5 beta 6, I have a drag-and-drop situation where the data being moved between nodes is stored using instances of a custom resource.
The resource instance is added to a property called ...
1
vote
1
answer
308
views
Overriding property setter
In Godot 4.5 beta 5, I am trying to override the text setter on a Label node. Following the documentation, I did:
...
1
vote
1
answer
105
views
How to format a godot::String with an array parameter in a gdextension?
I'm writing a gdextension and trying to format a string using an array as one of the parameters.
Example:
...
0
votes
0
answers
64
views
Instantiated child scene does not rotate with the parent as pivot
Version 4.4
I am starting to learn Godot by creating a game in which my ‘Player’ scene is instantiating and adding a ‘Ball’ scene as its child on starting the game. I position the Ball at a distance ...
0
votes
0
answers
67
views
What am I missing to get my animation working
I use Godot 4.4 and gdscript. I have a 2D isometric character with hundreds of sprite sheets for different angles and weapon status. Its not feasible to do this in ...
0
votes
1
answer
283
views
How to correctly set up peering bits for terrain sets/autotiling?
I'm trying to set up autotiling for this tileset in Godot:
I set the peering bits like this:
However, when I try to place the terrain tiles, all I get is this mess:
What am I doing wrong?
3
votes
1
answer
210
views
Arc Slot Layout and Card Display Overlap
I'm struggling with a persistent problem in my Godot 4.4.1 project involving "power slots" arranged around a table or arena background. No matter how I structure my nodes and update my code, ...
2
votes
2
answers
141
views
Pseudo-3D Parallax Shifting
everyone. I am working on a game that relies pretty substantially on "faking" 3D by using different parallaxing and polygonal transform techniques. In a current example, I am working on a ...
1
vote
1
answer
142
views
How to pre-process the @export variable in Godot4?
Assume I have an export "arena_size". I would like to 'pre-process' this export so that whatever value user inputs in the inspector gets multiplied by 2 Like so:
...
1
vote
1
answer
308
views
How to use @export to list all the keys of the dictionary in Godot4?
Godot 4.2
@export is rather useful as a time saving feature for node customization. We already have the @export_enum that can give user a dropdown list of choices.
However, @export_enum is "...
1
vote
1
answer
168
views
Why can't I access custom properties clearly declared with _get_property_list()?
I have the following script attached to a simple control node designed to create a custom property "label":
...
0
votes
1
answer
129
views
In Godot, how to show TextureRect texture in the editor mode but unload it before runtime to preserve VRAM?
I'm trying to optimize a bit. Assume we have an in-game "Item" object made from a simple TextureRect (no children).
Naturally, in editor mode I'd like to be able to see that item's icon (and ...
0
votes
0
answers
129
views
What technical factors might cause a CrazyGames rejection for a Godot web game?
I submitted a top-down shooter made in Godot (HTML5 export) to CrazyGames, but it was rejected without any detailed feedback. The name of the game is "Spacy Type" (available to preview here)....
1
vote
1
answer
290
views
How to make a rounded corners Player Icon in Godot 4.2.2?
I'm trying to implement a "rounded square" player character's icon in the UI. The actual .png of the icon is, of course, square, 256x256 px, so the UI element must round its corners "on ...
1
vote
0
answers
54
views
Why did my game get rejected by CrazyGames? Looking for feedback on first impressions [duplicate]
I recently submitted my HTML5/WebGL game to CrazyGames.com, but unfortunately it was rejected without specific feedback.
Here’s the preview link:
https://www.crazygames.com/preview/25901363-36f7-4d64-...
0
votes
0
answers
47
views
Error compiling godot 2.0 from source on raspberry pi
I’m somewhat new to 3D game development having briefly played with unreal engine. I tried installing Godot 3.2 from apt but it won’t let me do anything because the openGL drivers are too new for my Pi ...
0
votes
0
answers
62
views
Runtime defined classes in Godot
Godot offers the CodeEdit node that lets users write code during runtime.
I want to:
Offer GDScript LSP-features inside the CodeEdit
Interpret the written code as GDScript
Check if a class was ...
0
votes
1
answer
170
views
Godot 4 chip-8 emulator not displaying font correctly
I'm making an emulator for the chip-8 using the Godot 4.3 game engine, It's almost complete and you can play pong on it perfectly fine, But it can't display numbers from the built in font.
Each ...
2
votes
1
answer
420
views
Is await/free in gdscript a potential memory leak?
Consider a situation where a coroutine in node A awaits a signal from node B. If node B gets freed without sending the signal, obviously the coroutine in node A will never finish executing. Does it ...
12
votes
2
answers
4k
views
What is the cause of these pixel artifacts and how do I prevent it?
I'm getting these strange image artifacts when I attempt a low-res 3D orthographic scene in Godot 4.4:
Here's my steps to reproduce:
In MagicaVoxel, export the built-in "castle" example to ...
5
votes
2
answers
666
views
How do I make my chip-8 emulator update at the intended rate?
I'm making an emulator/interpreter for an old console called the CHIP-8 In Godot 4.3 stable. It's going really good so far, I basically just load an external ROM into a virtual RAM (a ...
1
vote
2
answers
863
views
Enter The Gungeon-style fake 2D in 3D engine, in Godot 4
So I'm trying to create a top-down pixel-art RPG, but for the primary mechanic to work, I need the engine to be in 3D and just use camera trickery to make the game look like tile-based top-down 2D. ...
0
votes
1
answer
159
views
How to control the order of _input_event and _input?
Suppose I have these two classes
...
0
votes
1
answer
615
views
Proper Parent-Child Relationships for Control Nodes in Godot
I originally thought of Control nodes as UI elements, but I've seen techniques where a ColorRect is placed as a child of a Sprite2D to change the sprite's color.
Clip Children Not Working on ColorRect ...
0
votes
1
answer
131
views
Create ArrayMesh from GridMap
I want to generate a simplified mesh from cubes placed in a GridMap in Godot. I came up with the following code, however, the resulting ArrayMesh appears so be invalid, as ...
1
vote
1
answer
322
views
What is the relation between TileMapLayer, Terrain Set and Terrain?
Godot 4.3 introduced TileMapLayer as node, which was previously part of TileMap node.
Each TileMapLayer allows defining different Terrain Sets.
Each Terrain Sets allows defining different Terrains.
I'...
1
vote
1
answer
278
views
How do I point a bone at a target using Godot's SkeletonModifier3D?
I've been trying to learn more about Godot's SkeletonModifier3D and I'm starting with a simple feature: I want a bone that points at a Node3D.
I tried following this official guide: https://...
1
vote
0
answers
67
views
How are the Inspector, Select Tab, and Paint Tab related in the Terrains settings?
use: Godot Engine v4.3.stable.official, TileMapLayer
How are the Inspector, Select Tab, and Paint Tab related in the Terrains settings?
There are many settings that need to be configured in Terrains, ...
1
vote
1
answer
200
views
I'm not sure how to set up tile animations in TileMapLayer
use: Godot Engine v4.3.stable.official, TileMapLayer
I don't quite understand how to configure tile animations.
As a reference, I'm watching this video:
https://www.youtube.com/watch?v=it0lsREGdmc
I'm ...
0
votes
1
answer
107
views
For some reason, autocompletion works even though it's "Disconnected."
I installed the following extension: https://marketplace.visualstudio.com/items?itemName=woberg.godot-dotnet-tools
but I'm not sure if it's actually related to autocompletion. I've tried turning the ...
0
votes
1
answer
111
views
Error when calling function from script using class_name
I'm making a mockup desktop for a sandbox game. I have a script, in which I defined a ObjContainer class that extends the Control...
0
votes
3
answers
575
views
What is the difference between only extends, class_name before extends, and class_name after extends?
I am having trouble understanding the syntax in GDScript, specifically the use of class_name and extends.
I often come across ...
1
vote
2
answers
161
views
When I add a camera to the player, the trees become distorted
When I added a camera to the player(so that the camera automatically follows the player), the trees became distorted.
Could this be the phenomenon known as Pixel Bleeding?
https://verygood.ventures/...
0
votes
1
answer
783
views
How to fix "Identifier not declared in the current scope" error?
When I try to run the following code in Godot, I get the error:
Line 45:Identifier "delta" not declared in the current scope.
I don't know what this means or what I should do about it.
<...
1
vote
1
answer
105
views
I want to learn Size and anchors, but I don't understand the steps
I want to learn from the following documentation, but I don't understand the steps:
https://docs.godotengine.org/en/4.2/tutorials/ui/size_and_anchors.html
I've been reading the page, but I still can't ...
0
votes
1
answer
199
views
Clip Children Not Working on ColorRect as a Child of Sprite2D
I set a ColorRect as a child of Sprite2D and set "Clip Children" to "Clip + Draw", but it didn't get clipped. When I tried it with a different object, it worked fine. I can't ...
1
vote
2
answers
835
views
How to Assign Collision Layers and Masks for Player, Enemies and Background?
In this video tutorial I'm following, both the player and the enemy are ultimately assigned two colliders each (one directly under the CharacterBody2D root node and one under the Area2D child node). ...
0
votes
1
answer
822
views
Do I need to write an _init() for my Resources?
When I create my own Resource class in gdscript, I feel like I need to create a boilerplate _init() function or it won't serialize correctly. This function is ...
1
vote
1
answer
354
views
How can I @export a mapping of enum to Texture2D?
I have an enum and I want to assign a texture to each enum value. I can create an @export for each item in the enum, but that's clumsy. I can ...
0
votes
1
answer
204
views
How to debug Godot web builds are too big?
My Godot web build is too big for itch.io's web build requirements. In fact, the index.pck in the exported build is bigger than my entire project:
...
1
vote
1
answer
166
views
How do I make these nested match statements easier to read?
Still coding that awesome Turn based RPG.
I'm currently coding the logic for firstly selecting the attack then selecting the enemy (Or enemies)
...
1
vote
0
answers
124
views
How to list all cached resources?
In Godot 4.3, is there a way to list all cached resources, and their resource_path values? These may be loaded from disk or may belong to packed scenes (which would ...