If you've never written code before, GDScript is a kind first language. It looks a lot like Python, it's built into Godot, and you can see your changes run a few seconds after you type them. That fast loop is the whole reason it sticks.
This is the part most "learn Godot" videos rush past. Let's slow down and actually understand what you're typing.
What GDScript is
GDScript is Godot's own scripting language. Every script you write attaches to a node, and that script controls what the node does: how it moves, when it takes damage, what happens when it's clicked. You're not writing a whole program from scratch. You're handing one node a set of instructions.
If you know Python, you'll feel at home in about ten minutes. If you don't, that's fine, because the basics are small.
Variables
A variable is a labeled box that holds a value. You make one with var:
var player_name = "Knight"var health = 100var speed = 250.0var is_alive = trueGodot can guess the type from the value, but you can also say it outright. Typed variables catch mistakes early and give you better autocomplete, so get in the habit:
var health: int = 100var speed: float = 250.0var player_name: String = "Knight"Functions
A function is a named block of steps you can run on demand:
func take_damage(amount: int) -> void: health -= amount print("Took ", amount, " damage. Health is now ", health)func starts it, take_damage is the name, amount: int is the value you pass in, and -> void means it doesn't hand anything back. Indentation matters in GDScript, same as Python. The indented lines are what's inside the function.
The two functions you'll use constantly
Godot calls some functions for you automatically. Two of them you'll use in nearly every script:
func _ready() -> void: # Runs once, when the node enters the scene print("I'm alive!")func _process(delta: float) -> void: # Runs every single frame position.x += 100 * delta_ready() is your setup. _process(delta) runs every frame, which is how you do anything continuous, like movement. That delta is the time since the last frame, and multiplying by it keeps your game running at the same speed on a fast or slow machine. Forgetting delta is the number one beginner mistake, so notice it now.
Talking to nodes
Your script can reach other nodes in the scene. The $ shortcut grabs a child node by name:
func _ready() -> void: $Sprite2D.modulate = Color.RED # tint the sprite red $Label.text = "Game Start"For nodes you use a lot, cache a reference once with @onready so you're not looking it up every time:
@onready var sprite: Sprite2D = $Sprite2DTweak values from the editor
Slap @export in front of a variable and it shows up in the Inspector. Now you can change speed or health without opening the script, which is huge once you start tuning your game:
@export var speed: float = 250.0@export var max_health: int = 100Decisions and loops
if runs code when something is true. for repeats code:
if health <= 0: print("Game over")elif health < 30: print("Careful, low health")else: print("Doing fine")for i in 3: print("Spawning enemy ", i)That's most of the language. Variables, functions, the two lifecycle calls, node access, and a couple of control structures. Everything else is built on top of these.
Your first real script
Here's a complete script that moves a sprite and prints when it's set up. Attach it to a Node2D and press play:
extends Node2D@export var speed: float = 200.0func _ready() -> void: print("Moving right at ", speed, " pixels per second")func _process(delta: float) -> void: position.x += speed * deltaThat's a working program. It runs, it moves, and you wrote it.
Where to go next
Reading about a language and using it are different skills, and only one of them makes you a developer. Our Code From Zero quest walks you from your literal first line to attaching real scripts to nodes, and it's completely free. The first eight lessons run right in your browser, so you can start before you've even installed anything.
Keep the GDScript cheat sheet open in another tab while you build. It's the reference you'll come back to for months.
FAQ
Is GDScript hard to learn?
Not for a first language. The syntax is small and readable, close to Python, and Godot's fast edit-run loop means you see results in seconds. The hard part of game dev isn't the language, it's learning to wire systems together, which comes with practice.
Do I need to know Python before GDScript?
No. GDScript looks like Python, so Python knowledge transfers, but plenty of people learn GDScript as their very first language. The indentation rules and clean syntax are beginner-friendly on their own.
Should I learn GDScript or C# in Godot?
Start with GDScript. It's built in, it has the best editor integration, and almost every Godot tutorial uses it. C# is worth it later if you need raw performance or already know it well. We compared them in detail in GDScript vs C#.