Hello World in GDScript

Our first program will print the classic “hello world” message. Here’s the full source code.

extends Node

# Called when the node enters the scene tree for the first time.
func _ready():
    print("hello world")

To run the program, you need to add this script to a Node in a scene and then run the scene in the Godot Engine.

The output should display “hello world” in the output panel.

Now that we can run and build basic GDScript programs, let’s learn more about the language.