Questions tagged [godot]

Godot is a 2D and 3D open source game engine developed by Godot Engine community. It features a built-in development environment which runs on Windows, OS X and Linux and can create games targeting PC, mobile and web platforms.

Godot Engine is a fully-featured, MIT licensed 2D and 3D game engine, which can be used to create games, apps and gamedev-related tools. It has been open sourced under the MIT license and is now developed and maintained by the Godot Engine community.

The engine supports multiple scripting languages. Aside form C, VisualScript and C# it also offers it's own programming language called GDScript. GDScript is a dynamically typed scripting language with a Python-like syntax. Alternatively, the developers can use C++ to add or improve functionality.

On 6 July 2023, the Godot Engine contributors released version 4.1 (announcement).

The current stable version is 4.1.1.

Resources

This is a list with a few good resources to know more:

1783 questions
19
votes
3 answers

Godot: what are .import files, and should you commit them to git?

In Godot, when you import images and other assets into the editor, there's an additional .import file created. What are those .import file used for? Should you commit them to your git repo?
PapaFreud
  • 3,636
  • 4
  • 34
  • 45
15
votes
1 answer

How do I adapt AStar in Godot to platformers?

I've been looking for a robust method of pathfinding for a platformer based game I'm developing and A* looks like it's the best method available. I noticed there is a demo for the AStar implementation in Godot. However, it is written for a grid/tile…
Matthew
  • 768
  • 1
  • 11
  • 25
15
votes
11 answers

Android : App not installed

Newbie here.....I made my first game with Godot game engine and exported to android successfully.....copied to my phone, it installs and runs fine. After a couple of hours, I made some changes and exported it again.....Again copied the apk but now…
Suhail Khan
  • 190
  • 1
  • 1
  • 7
14
votes
2 answers

How to write Tests in Godot engine

Soo I'm developing a game with the Godot engine and I want to create some test for the code to be sure that everything is working, I can't test the game with simple actions it takes 5-10 minutes. Is there a way to write tests ???
14
votes
2 answers

Can Godot and GDScript store functions in variables?

I am confused by part of the Godot Docs for the GDScript language. About midway down the page, in the "Referencing Functions" section, it says you can't store functions in variables, and then seems to immediately contradict itself. Can Godot…
LuminousNutria
  • 1,883
  • 2
  • 18
  • 44
13
votes
7 answers

Godot Keyboard Events

I am studying the Godot Engine and GDScript and I searched on the internet about keyboard events, but I didn't understand. Is there something in Godot like: on_key_down("keycode")?
user193464
  • 380
  • 1
  • 6
  • 25
11
votes
8 answers

Godot 3d get Forward Vector

I was wondering if there was a way to get the forward vector of a spatial node in godot 3d. In unity this would simply be transform.forward. Godot gives me a rotational vector but im not sure how to convert this to a directional vector. What is…
SanzioSan
  • 224
  • 1
  • 2
  • 12
10
votes
1 answer

How do I detect collision in Godot?

I'm making a game in Godot and I can't figure out what code I can use for a Death Plane (an area where an entity passes through and it de-spawns or dies).
GabeCodes
  • 125
  • 1
  • 1
  • 10
10
votes
1 answer

How do I implement structures in GDScript?

Is there an equivalent of a C# structure/class in GDScript? E.g. struct Player { string Name; int Level; }
Max
  • 434
  • 1
  • 3
  • 13
10
votes
2 answers

How to load textures from a spritesheet in Godot 3

I've just got started with Godot yesterday, and I'm starting a game. I drew a few spritesheets for it. It seems much more efficient to pack all of the frames of an animation into a single image file, right? Anyway, in Godot I have an AnimatedSprite,…
Jacob Garby
  • 773
  • 7
  • 22
9
votes
2 answers

How do I get which Control node currently has focus?

I'm trying to determine which Control node has just changed focus. Another Control node has been set up for using focus by changing the focus mode on the node to All. From within that node's script, I can tell if it has focus by checking has_focus.…
Kyle Pollard
  • 2,204
  • 1
  • 13
  • 27
9
votes
1 answer

Godot 3.2.1. Can't change this state while flushing queries. Use call_deferred() or set_deferred() to change monitoring state instead

In my 2D game player has the ability to destroy crates, objects with two collision shapes. When destroyed, crate spawn items that also have collision shapes. But when the following function called many similar errors are displayed in the Godot…
Andrey Kachow
  • 936
  • 7
  • 22
9
votes
2 answers

Godot how to center text on label?

I just made a new Godot project and created a Label with text. Even with Align: center the text stays top left when I run the game. Label.tscn [gd_scene format=2] [node name="Label" type="Label" index="0"] anchor_left = 0.0 anchor_top =…
shwick
  • 4,277
  • 6
  • 21
  • 28
8
votes
3 answers

How to convert global enum values to string in Godot?

The "GlobalScope" class defines many fundamental enums like the Error enum. I'm trying to produce meaningful logs when an error occurs. However printing a value of type Error only prints the integer, which is not very helpful. The Godot…
bluenote10
  • 23,414
  • 14
  • 122
  • 178
8
votes
2 answers

How to make image fit screen in Godot

I am new in godot engine and I am trying to make mobile game (portrait mode only). I would like to make background image fit screen size. How do I do that? Do i have to import images with specific sizes and implement them all for various screens? If…
Tadej Vozlic
  • 387
  • 5
  • 6
  • 17
1
2 3
99 100