Game development

Stage 2 · Lesson 1 of 7

GDScript with static types

Programming for games

is Godot's built-in language. It uses indentation like and works closely with the editor. Learn variables, functions, conditions, loops, arrays, dictionaries and enums first.

Then add static types, which state what kind of value something holds, such as var speed: float and func heal(amount: int) -> void. Static typing gives better and catches mistakes in the editor rather than during play. It also makes code faster.

Learn the built-in types too, and the @onready and @export , which you will use in every script.

Common trapleaving everything untyped, which hides typos until that line runs in the middle of a playtest, or treating GDScript as identical to Python and reaching for libraries that do not exist.

A question to check yourself, an AI practice session and 1 cheat sheet entry 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?