Godot
lastmod 2025-11-07created 2019-10-16202 edits
Godot is a 2D and 3D, cross-platform, free and open-source game engine released under the MIT license. It was initially developed by Juan Linietsky and Ariel Manzur for several companies in Latin America prior to its public release. The development environment runs on multiple operating systems including Linux, macOS, and Windows. Godot can create games targeting PC, mobile, and web platforms.
Categories
- Game Programming
- GDNative
- GDExtension (4.0)
- Godot:GUI - Includes a tutorial on GUI layout.
- Godot:CardGame - About implementing card games.
- Godot:AudioServer
- Godot:RecordingWithMicrophone - How to record with a microphone
- Godot:PixelArt - How to make pixel art games, caveats, etc.
- Godot:CustomDrawing
- Godot:CustomResources
- Godot:Animation
- Godot:Signal
- Godot:Node
Math
Export
- Godot:Export:Android
- Android:Debugging:Wireless - How to debug Android wirelessly
Script
Node
- CollisionObject2D - Character collision detection.
- Area2D
- PhysicsBody2D
- KinematicBody2D - A special type of 2D body that can be controlled by the user.
- RigidBody2D - A body controlled by the 2D physics engine.
- StaticBody2D
- AnimatedSprite - Applies a character animation sprite (Sprite).
- Sprite - Applies a character sprite (Sprite).
Resource
- Resource
- Font
- BitmapFont
- DynamicFont
- Font
Godot:ProjectSettings
- Godot:ProjectSettings
- Godot:InputMap - User input.
- Godot:Localization - Localization
- Godot:AutoLoad
APIs/Classes
Extension & Plugins & Projects
- VPainter
- vim-godot
- Antialiased Line2D
- godot-mobile-midi - A mobile MIDI support plugin I am building myself
- PixelDot - Godot plugin for making 2D sandbox games like Terraria and Starbound.
- Dialogue Manager - A simple but powerful branching dialogue system for Godot
- ShaderV - VisualShader plugin for Godot Engine 4.x
- Godot Visual Effects - Open-source visual effects designed in Godot, from our VFX Secrets course.
- Godot Tools (godot-vscode-plugin) - VSCode plugin
- TerraBrush - A minimal Terrain heightmap editor for Godot engine.
- Terrain3D - A high performance, editable terrain system for Godot 4.
- godot_spatial_gardener - A Godot plugin, implemented in GDScript, for painting plants and props on arbitrary 3D surfaces
- Skelerelams - An open world RPG framework for Godot 4.
- TileMapDual - An automatic, real-time dual-grid tileset system for Godot
- Dialogue Engine - A minimalistic dialogue engine for the Godot Game Engine
- Godot Road Generator - Making roads in godot
- Waterways - A tool that generates river meshes with flow and foam maps based on Bezier curves.
- SignalVisualizer - A plugin for Godot 4.x. SignalVisualizer displays the current scene's signals and connections in a easy to read graph and tree dock.
- Godot Realistic Water
- ProtonGraph - Experimental node-based software for procedural content generation
- SimpleGrassTextured - Plugin to make grass on Godot 4
- Character generator importer tool - This is an unofficial tool that can be used as a plugin in Godot to speed up the process of creating animations for the character generator 2.0
- Github - detomon/wigglebone - Adds jiggle physics to Skeleton3D bones using the SkeletonModifier3D node. (Can be used for effects like trees swaying in the wind)
- Godot Orchestrator - Orchestrator: Unleashing Creativity with Visual Scripting
- Pandora - Godot 4 addon for RPG data management such items, inventories, spells, mobs, quests and NPCs.
Samples
- Github - Piano with GodotEngine C#
- Lorien - Open-source infinite whiteboard/note-taking tool
- ZzSprite Godot - Pixel Art Sprite Generator
- COGITO - A first-person immersive sim template project for Godot Engine 4.
- SakuyaCN/TowDownGame: Godot top-down 2D shooter game
GDQuest Demos
Demos in the https://github.com/gdquest-demos repository
- [Recommended] gdquest-demos/godot-4-new-features - Free and open-source Godot 4 demo scenes to see the new features in action
- gdquest-demos/godot-2d-space-game - A 2D space exploration and mining game made with Godot and our AI framework
- gdquest-demos/godot-make-pro-2d-games - A-RPG demo made with Godot, MIT-licensed, from our Godot course
Dungeon Generation
- GitHub - GDQuest/godot-procedural-generation - Procedural generation algorithms and demos for the Godot game engine
- GitHub - CheapMeow/Godot-MapGeneratorSampleProject
- GitHub - SlothInTheHat/Godot-4-Procedural-Generation - Procedural Generation using Godot 4
- Github - majikayogames/SimpleDungeons - SimpleDungeons is a Godot 4 addon which allows for the creation of procedurally generated 3D dungeons/levels using user defined prefab rooms.
Particle
- pirachute/godot-weather-2D - An easy to use 2D Weather for Godot games including wind, rain, snow and some scene darkening...
- Dust Particles (Godot 3) - YouTube
Editors
- SirRamEsq/SmartShape2D - A 2D Terrain Tool for Godot 3.2
Debug
- godot-extended-libraries/godot-debug-menu - Display in-game FPS/performance/hardware metrics in a Godot 4.x project
Godot Compiling
- Compiling — Godot Engine (stable) documentation (Korean)
- Introduction to the buildsystem
- Godot:Compiling:Windows - Compiling for Windows
- Godot:Compiling:X11 - Compiling for X11 (Linux, *BSD)
- Godot:Compiling:macOS - Compiling for macOS
- Godot:Compiling:Android - Compiling for Android
- Godot:Compiling:iOS - Compiling for iOS
- Cross-compiling for iOS on Linux
- Compiling for Universal Windows Platform
- Godot:Compiling:Web - Compiling for the Web
- Godot:Compiling:Mono - Compiling with Mono
- Optimizing a build for size
- Compiling with script encryption key
Supporting multiple resolutions
How to install
Arch Linux
Install the mono version of godot from the AUR.
Alternatively, if you want to install the mono binary from the homepage yourself, add the following dependencies.
GNOME Desktop Icon
The logo svg can be downloaded from the homepage/download page1. (Direct download: Godot_logo.svg.zip)
Create the file ~/.local/share/applications/godot.desktop and paste in the following.
[Desktop Entry]
Version=1.5
Type=Application
Name=Godot Engine
Icon=/home/your/Applications/godot/godot_logo.svg
Exec="/home/your/Applications/godot/Godot_v3.4-stable_mono_x11.64" %f
Comment=Free and open source 2D and 3D game engine
Categories=Development;IDE;
Terminal=false
StartupNotify=true
External text editor
How to connect an external text editor:
Check under Editor -> Editor Settings -> Text Editor -> External.
Godot will replace the following inside the flags parameter:
| Field in Exec Flags | Is replaced with |
| | The absolute path to the project directory |
| | The absolute path to the file |
| | The column number of the error |
| | The line number of the error |
Some example Exec Flags for various editors include:
| Editor | Exec Flags |
| geany/kate | |
| atom/sublime text | |
| |
File paths in Godot projects
Accessing persistent user data
Locations of files starting with user://:
| Type | Location |
| Default |
|
| Custom dir |
|
| Custom dir and name |
|
Converting paths to absolute paths or "local" paths
You can use ProjectSettings.globalize_path() to convert a "local" path like res://path/to/file.txt to an absolute OS path. For example, ProjectSettings.globalize_path() can be used to open "local" paths in the OS file manager using OS.shell_open() since it only accepts native OS paths.
To convert an absolute OS path to a "local" path starting with res:// or user://, use ProjectSettings.localize_path(). This only works for absolute paths that point to files or folders in your project's root or user:// folders.
Editor data paths
The editor uses different paths for editor data, editor settings, and cache, depending on the platform. By default, these paths are:
| Type | Location |
| Editor data |
|
| Editor settings |
|
| Cache |
|
- Editor data - contains export templates and project-specific data.
- Editor settings - contains the main editor settings configuration file as well as various other user-specific customizations (editor layouts, feature profiles, script templates, etc.).
- Cache - contains data generated by the editor, or stored temporarily. It can safely be removed when Godot is closed.
Meaning of the delta value in Process
Because the frame rate may differ from one video frame to another, the time delay (delta) between frames is passed to the _process(delta) function. This is a float value of the number of seconds between frames, so it is likely to be around 0.0167 seconds.
In short:
extends Node2D
# Desired movement in pixels/second.
var movement = Vector2(120, 0)
func _process(delta):
$Sprite.position += movement * delta
Examples
- godot-mobile-midi - A MIDI Input implementation built with GDNative, usable on mobile.
- Godot:Examples:FileOpenScene - Implementing a file open dialog using GDScript.
Root viewport
The root Viewport is always at the top of the scene. From a node, it can be included in two different ways:
Change scene
- Docs » Step by step » SceneTree
- Change scenes manually — Godot Engine (stable) documentation in English
Linking an already-created resource:
var nextScene = (PackedScene)ResourceLoader.Load("res://levels/level2.tscn");
GetTree().ChangeSceneTo(nextScene);
In 4.0, use the following.
var scene = ResourceLoader.Load("res://Slot.tscn") as PackedScene;
this.GetTree().ChangeSceneToPacked(scene);
Loading resources from code
var texture = (Texture)GD.Load("res://robi.png"); // Godot loads the Resource when it reads the line.
var sprite = (Sprite)GetNode("sprite");
sprite.Texture = texture;
Loading scenes
To get an instance of a scene, you must use the PackedScene.instance() method.
private PackedScene _bulletScene = (PackedScene)GD.Load("res://bullet.tscn");
public void OnShoot()
{
Node bullet = _bulletScene.Instance();
AddChild(bullet);
}
Reloading the scene
Removing a scene
var root = GetNode("/root");
var level = GetNode("level");
root.RemoveChild(level)
level.CallDeferred("free")
Alternatively, the QueueFree() function removes it safely.
Getting the screen size
// you can find the size of viewport using this:
GetViewport().GetRect().Size
GetViewportRect().Size
// or you can find the windows_size by
OS.GetWindowsSize()
Resizing the scene to the screen size
using Godot;
using System;
public class LoginUI : Panel
{
public override void _Ready()
{
SetSize(GetViewportRect().Size);
}
}
Printing log messages
Quit
Troubleshooting
Black screen when running after exporting the package (Export)
This can happen if no start scene is selected. Select Main Scene in Project Settings > General > Application > Run.
Child Scene not removed properly when removing it from an outer Scene
Assume the following scene.
Godot_Area2D_troubleshooting_screenshot_1.png
Another scene can instantiate and use the scene above as follows.
using Godot;
using System;
using System.Collections.Generic;
public class Piano : Node2D
{
private PackedScene _eight_note = GD.Load<PackedScene>("res://EighthNote.tscn");
private Random _random_device = new Random();
// ...
private void _on_Timer_timeout()
{
EighthNote note = _eight_note.Instance() as EighthNote;
GD.Print("Create new Sprite " + note.ToString() + " ins id: (" + note.GetInstanceId() + ")!!");
AddChild(note);
int line_height = _random_device.Next(0, 5);
note.Position = new Vector2(GetViewportRect().Size.x, 470 - (line_height*8));
note.Scale = new Vector2(0.2f, 0.2f);
}
}
The problem: in certain events (e.g. the area_exited signal of Area2D), the Child Node is received as the event object, and in this case removing the object passed by the event with QueueFree does not remove it properly.
In this case, as shown in the figure below, changing the object received by the event to the topmost (Root) object makes removal work properly.
Godot_Area2D_troubleshooting_screenshot_2.png
=== .NETFramework,Version=v4.7.2 were not found ===
- Build fails, when Net 5 is set as a Build Tool · Issue #43717 · godotengine/godot · GitHub
- Install the .NET Framework developer pack or redistributable | Microsoft Docs
- See OmniSharp#.NETFramework,Version=v4.7.2 were not found.
The following error may be printed.
Project "EduPiano.sln" (Restore target(s)):
Message: Building solution configuration "Debug|Any CPU".
Project "EduPiano.csproj" (_IsProjectRestoreSupported target(s)):
Done building project "EduPiano.csproj".
NuGetMessageTask: Determining projects to restore...
Project "EduPiano.csproj" (_GenerateRestoreProjectPathWalk target(s)):
Done building project "EduPiano.csproj".
Project "EduPiano.csproj" (_IsProjectRestoreSupported target(s)):
Done building project "EduPiano.csproj".
Project "EduPiano.csproj" (_GenerateRestoreGraphProjectEntry target(s)):
Done building project "EduPiano.csproj".
Project "EduPiano.csproj" (_GenerateProjectRestoreGraph target(s)):
Done building project "EduPiano.csproj".
RestoreTask: Committing restore...
RestoreTask: Assets file has not changed. Skipping assets file writing. Path: /home/your/Project/EduPiano/.mono/temp/obj/project.assets.json
RestoreTask: Restored /home/your/Project/EduPiano/EduPiano.csproj (in 41 ms).
RestoreTask:
RestoreTask: NuGet Config files used:
RestoreTask: /home/your/.nuget/NuGet/NuGet.Config
RestoreTask:
RestoreTask: Feeds used:
RestoreTask: https://api.nuget.org/v3/index.json
RestoreTask: All projects are up-to-date for restore.
Done building project "EduPiano.sln".
Project "EduPiano.sln" (Build target(s)):
Message: Building solution configuration "Debug|Any CPU".
Project "EduPiano.csproj" (default targets):
/usr/share/dotnet/sdk/5.0.104/Microsoft.Common.CurrentVersion.targets(1180,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.7.2 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [/home/your/Project/EduPiano/EduPiano.csproj]
Done building project "EduPiano.csproj" -- FAILED.
Done building project "EduPiano.sln" -- FAILED.
For 3.2.3, you can add the following property inside the PropertyGroup of the csproj:
Unhandled Exception: System.TypeLoadException: Could not resolve type with token
Check that the TargetFrameworks value in the .csproj file matches the version for the distributed build. For reference, the Godot 3.2.3.stable.mono version uses net472.
System.UnauthorizedAccessException
When using the mono version of godot, if an error like System.UnauthorizedAccessException: Access to the path {...} is denied occurs
Check the permissions in the AndroidManifest.xml file:
<manifest ...>
...
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
...
<application android:requestLegacyExternalStorage="true" ...>
...
</application>
...
</manifest>
When using a class like System.IO.FileStream, omitted arguments can end up requesting unwanted permissions as well. Always specify all permissions explicitly.
Specify the FileAccess.Read parameter as well, as follows.
Type Error
When the code is written like this,
if a Type error occurs even though the code has no problems, try adding Godot as follows.
Mono AOT compiler exited
When exporting a package to iOS, the message above is printed with exit code 1. See XCode#NSPOSIXErrorDomain: Operation not permitted.
As an aside, also see .NET Core.
Not working GD.Print method
If GD.Print()-related functions do not work, check whether the subprojects or script files are properly placed in the solution or project file ([Project].sln, [Project].csproj).
Android APK installation error
If you add resource files that are not registered to the godot project directory, the Android APK does not install properly.
Console logs not printed after Android Remote Debugging
Check the checkbox of the Debug > Deploy with Remote Debug menu.
Godot-debug-deploy_with_remote_debug.png
Unsupported class file major version 61
See Gradle#Unsupported class file major version 61.
'jarsigner' returned with error #1
See Godot:Export:Android#'jarsigner' returned with error #1.
HUD moves along when the screen (camera) moves
Add the GUI nodes as child nodes of a new Godot:CanvasLayer.
See also
- Game Engine
- Unity
- Material Maker
- Parallax scrolling
- The Mirror - The open-source Roblox & UEFN alternative giving you freedom to own what you create. An all-in-one, real-time, collaborative game development platform built on Godot.
- React Native Godot - Embedding the Godot engine in React Native
Favorite site
- Godot Engine: Korean text input and output in Godot Engine
- Github - godotengine/awesome-godot - A curated list of free/libre plugins, scripts and add-ons for Godot
Tutorials
- Getting started with the Godot Engine tutorial
-
Godot · KCC Blog - [Recommended] Home :: Godot 4 Recipes
- [Recommended] _Dev uNOWn :: (Godot Engine) 09 - Backgrounds and tile maps - Step-by-step, detailed explanations
- Youtube - Complete Godot Rhythm Game Tutorial - How to make a rhythm game with Godot.
- Instancing with signals - How to create and connect signals, summarized with a bullet-shooting character example.
- Youtube - Introduction to UI Containers in Godot 3 (tutorial) - How to use controls such as VBoxContainer.
- [Recommended] Godot Tutorial - Javatpoint - Step-by-step usage explanations with screenshots.
- Posts in the 'Programming/Godot' category
Guide
- Youtube - Godot + C# + Visual Studio Code
- Sync the gameplay with audio and music — Godot Engine (stable) documentation (Korean) - How to sync gameplay with audio and music
- Coding the player — Godot Engine (stable) documentation (Korean)
References
- 3D Viewport Gizmo
- ArchLinux:Setup
- Bezier curve
- CSharp:Project
- Defold
- Desktop Entry
- Game Engine
- Game Programming
- GameProgramming:MultipleResolutions
- GDNative
- GDScript
- Godot Road Generator
- Godot spatial gardener
- Godot-mobile-midi
- Godot.Input.IsActionJustPressed
- Godot.PropertyHint
- Godot.Reference
- Godot:Animation
- Godot:AudioEffectRecord
- Godot:AudioServer
- Godot:AudioStreamPlayer
- Godot:AutoLoad
- Godot:BackgroundLoading
- Godot:BaseButton
- Godot:CanvasItem
- Godot:Compiling:Mono
- Godot:ConfigFile
- Godot:Container
- Godot:CSharp
- Godot:CustomDrawing
- Godot:CustomResources
- Godot:DynamicFontData
- Godot:Examples:FileOpenScene
- Godot:Export:Android
- Godot:Export:iOS
- Godot:FileSystem
- Godot:Font
- Godot:GraphEdit
- Godot:GUI
- Godot:HTTPClient
- Godot:HTTPRequest
- Godot:InputEvent
- Godot:InputMap
- Godot:Internationalization
- Godot:KinematicBody2D
- Godot:Label
- Godot:LanguageServer
- Godot:LineEdit
- Godot:LinkButton
- Godot:Metadata
- Godot:MIDI
- Godot:Migration:4.0
- Godot:MultipleResolutions
- Godot:Node
- Godot:NodePath
- Godot:PackedScene
- Godot:PacketPeer
- Godot:Physics
- Godot:PixelArt
- Godot:Plugins
and 34 more