Writing Your First Line of GDScript
So far we’ve set up a script and explored its structure. Now it’s time to actually write some code!
In this part of my journey, I experimented with two common functions in Godot: _ready()
and _process(delta)
. I wanted to understand how and when they run—so I did what every beginner coder does: printed "Hello, world!"
.
🧪 The First Print
Inside the _ready()
function, I wrote:
func _ready():
print("Hello, world!")
This function runs once when the scene is loaded. So when I hit Play, the console printed "Hello, world!"
exactly one time. Super simple—but super satisfying!

🔁 The Update Loop
Next, I used _process(delta)
to print a message on every frame. Here’s what I added:
func _process(delta):
print("Refreshing...")
When I ran the game again, the console filled up with “Refreshing…” messages, printing nonstop every frame until I paused or stopped the game.
This was my first real glimpse into the game loop—where things like movement and animation will eventually go.

💡 What I Learned
_ready()
is perfect for setup code—it runs once when the node is added to the scene._process(delta)
is called every frame and is great for logic that needs to repeat.print()
helps me see what’s running and when.- Debugging output shows up in the bottom console in Godot.
This small experiment helped me see how code hooks into the engine’s update cycle. Even though I didn’t build anything fancy yet, just understanding how and when functions run made everything feel a little less like magic.