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
5
votes
1 answer

Downloaded glb 3D model cut in half

I have this assignment that requires me to use some 3d model assets from the internet. I'm very new to this course. So, I tried to use car asset from https://www.cgtrader.com/items/2518230/download-page and download the glb extension. Once I opened…
Lulu
  • 49
  • 1
  • 3
5
votes
2 answers

How to call a variable from a preload script in godot?

When I make a preload script in godot and put a variable in there, how do I call the variable in my other scripts? Is there a special way to call the variable that I don't know or is there a better way to do it than preload scripts?
Theo
  • 51
  • 1
  • 2
5
votes
0 answers

How to use Neovim as External editor for Godot (Godot executable permissions)

I am trying to configure Godot to use launch Neovim in iTerm2 when I double click on a file containing code in the editor, however, a terminal window pops up instead with the following error: /Users/myusername/.../Scripts/Player.gd; exit zsh:…
5
votes
1 answer

Why is Pygame so much slower than 2d game engines?

I am a godot user and a Python user. In pygame, in a simple game like pong, I had an average of 55-60 FPS in fullscreen. In addition, when ported to Kivy, I had an average FPS of 60-70FPS. But when I coded this in Godot, and got an average FPS of…
Nv7
  • 406
  • 6
  • 20
5
votes
1 answer

Godot - How do I create a subarray of a list in Gdscript?

I know it's possible to slice an array in python by array[2:4]. The way I get around this is to just loop through the indexes I want and append them to the new_list. This way requires more work is there just a simple way to do it like in python?
jujumumu
  • 350
  • 4
  • 12
5
votes
1 answer

Godot - making labels on demand, and setting their font size with GDscript

Not to over explain, I basically need to create an unknown number of Labels, with unknown text. All fine and dandy - works. I can't seem to find how to change their font size though. Here's what I have: for string in string_list: var new_label =…
TopCat
  • 53
  • 1
  • 4
5
votes
2 answers

Godot make item follow mouse

I am making a 2D platformer in Godot 3.0 and I want to have the player throw/shoot items using the mouse to aim (similar to bows and guns in Terraria). How would I go about doing this? I am using gdscript.
5
votes
1 answer

How do I setup the esc key to exit Godot Application?

I have a question about something I'm getting stuck on with a new 2D project. I added a sprite background and it shows no problem when I run the test. I setup the esc key as "key_exit" in the Input Map. Then I created a node2D as the root and added…
Matthew
  • 768
  • 1
  • 11
  • 25
4
votes
2 answers

How do I loop an animation in a Godot animation player?

I'm trying to loop an idle animation that I have in an AnimationPlayer, but it keeps on only playing once. Is there any way for me to make it loop?
LeoDog896
  • 3,472
  • 1
  • 15
  • 40
4
votes
1 answer

Sync to physics change in godot 4

I am in the process of converting my game from godot 3 to godot 4. Previously in godot 3 when I was using rotating platforms, my player would sink a few pixels into the rotating platforms while they were moving up, and hover a few pixels above when…
Lou Bowlus
  • 43
  • 3
4
votes
2 answers

How to remove all punctuation from a string in Godot?

I'm building a command parser and I've successfully managed to split strings into separate words and get it all working, but the one thing I'm a bit stumped at is how to remove all punctuation from the string. Users will input characters like , . !…
Hidden
  • 63
  • 2
4
votes
1 answer

Godot: Cannot get path of node as it is not in a scene tree

I have a problem with Godot (I'm learning it). I have a project with 3 scenes, in each there are nodes with attached scripts, shown bellow. Main.gd extends Node2D var maquina func _enter_tree(): maquina = Maquina.new() …
Fahed
  • 195
  • 2
  • 10
4
votes
0 answers

Godot 3.4.4 How to stop audio in html export?

There was a problem with audio playing in the exported instance of the game. The sound is played using the AudioStreamPlayer node. I export the game to html5 and run it either on a local server or on any service that executes html code. If during…
4
votes
2 answers

Godot 4.0. how stop a auto call SceneTreeTimer?

I have this code : extends Area2D func _ready() -> void : auto_call() func auto_call() : await get_tree().create_timer(1, false).timeout print( "area autocall" ) auto_call() func stop_auto_call() : auto_call = null # how…
user70587
  • 63
  • 4
4
votes
1 answer

How to convert a string to enum in Godot?

Using Godot 3.4, I have an enum setup as: enum { STRENGTH, DEXTERITY, CONSTITUTION, INTELLIGENCE, WISDOM, CHARISMA } And I would like to be able to make the string "STRENGTH" return the enum value (0). I would like the below code to print the…
Nathan Headley
  • 152
  • 1
  • 13