Game development

Stage 2 · Lesson 2 of 7

Nodes, scenes and the scene tree

Programming for games

In Godot everything is a , a small building block with one job, such as a or a collision shape. Nodes form a tree, and a saved branch of nodes is a scene. A player, a bullet, a HUD and a whole level can each be a scene, and scenes can sit inside other scenes.

Godot's has three main . _ready runs when a node and its children enter the scene tree. _process runs every frame, and _physics_process runs at the fixed physics rate.

Design games as small scenes with one job each, then place copies () of them inside bigger ones. This is Godot's answer to both prefabs and components.

Common trapreaching across the tree with long paths such as get_node("../../UI/Health"), which break the moment you rearrange nodes; use exported references, unique names or signals instead.

A question to check yourself, an AI practice session and 2 cheat sheet entries come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

Practise

  • Free Godot 4 project tutorials and open source demos to build and read

  • A friendly one-sitting Godot course that builds a small platformer

Keep handy

Also worth your time

Mark this stage as not done?