Godot uses GDScript, a scripting language made for the engine and built into it. It reads like Python: blocks are indented, there are no semicolons, and logic uses words like and and not. Here is a complete script:
Hello, Ana
Life 1
Life 2
Life 3
Every example in these docs runs in real Godot 4, so press Run and edit the code to see what changes.
How a Godot Script Works
A GDScript file (.gd) is a class. The first line, extends Node, says which kind of node the script controls. You attach the script to a node in a scene, and Godot calls its functions for you:
_ready()runs once, when the node enters the scene._process(delta)runs every frame._physics_process(delta)runs every physics step._input(event)runs when the player presses a key, clicks or touches.
So you never write a main function. The engine runs the game loop, and your script reacts to it. The scene tree page shows how nodes and scripts fit together.
Why Godot Has Its Own Language
GDScript exists because a general language needs glue to talk to an engine. GDScript speaks Godot directly:
- Godot types are built in:
Vector2,Color,Node,Rect2. No imports. $Playerfinds a child node, and@exportshows a variable in the editor's Inspector.- Signals and
awaitare part of the syntax. - The editor checks your script as you type, with autocompletion for every node and method.
- Scripts reload while the game runs, so you see a change without restarting.
What About C# and C++?
Godot supports other languages, and you can mix them in one project:
| Language | How | Typical use |
|---|---|---|
| GDScript | built in | most games and every official tutorial |
| C# | the .NET build of Godot | developers coming from Unity or .NET |
| C++, Rust and others | GDExtension | performance-critical code, engine plugins |
GDScript is where almost everyone starts. The GDScript vs C# page compares the two side by side.
Godot 4 vs Godot 3 GDScript
These docs cover Godot 4. If you read an older tutorial, a few things changed:
| Godot 3 | Godot 4 |
|---|---|
export var speed = 200 | @export var speed = 200 |
onready var label = $Label | @onready var label = $Label |
yield(timer, "timeout") | await timer.timeout |
connect("pressed", self, "_on_pressed") | pressed.connect(_on_pressed) |
Code written for Godot 3 usually needs these edits before it runs in Godot 4.
Frequently Asked Questions
What language does Godot use?
Godot's main language is GDScript, which ships inside the engine and needs nothing else installed. Godot also supports C# through its .NET build, and C++ or other languages through GDExtension. Most tutorials, examples and the official docs use GDScript.
Is GDScript the same as Python?
No. GDScript borrows Python's look (indentation, for x in list, and, or, not) but it is a separate language. It has optional static types, its own built-in types such as Vector2 and Color, signals, @export, and no Python libraries. Python code does not run in Godot.
Is GDScript hard to learn?
It is one of the easier languages to start with. A script is short, the syntax is small, and the engine calls your functions for you (_ready, _process), so you write game logic from the first day.
Should I learn GDScript or C# for Godot?
Start with GDScript unless you already know C#. It is tighter with the editor, every Godot tutorial uses it, and it works in every export target. C# is a good choice for large codebases or if you plan to move to Unity later. See GDScript vs C#.