Est. 2014 Beginner

GDScript

A high-level, dynamically typed scripting language with optional static typing, designed specifically for the Godot game engine and syntactically inspired by Python.

Created by Juan Linietsky and Ariel Manzur (with the Godot community)

Paradigm Multi-paradigm: object-oriented (class-based), imperative, with first-class functions and signal-based event handling
Typing Dynamic by default, with optional gradual static typing (since Godot 3.1)
First Appeared 2014 (open-sourced as part of Godot Engine 1.0)
Latest Version Bundled with Godot 4.x (Godot 4.0 released March 2023)

GDScript is a high-level scripting language designed specifically for the Godot game engine. Its syntax is intentionally close to Python — indentation-based blocks, dynamic typing, terse function definitions — but the language is not Python: it is a distinct implementation tightly integrated with Godot’s class system, scene tree, and signal-based event model. Since Godot 3.1, GDScript has supported optional static typing, allowing developers to annotate variables, parameters, and return values when they want stronger compile-time checking and better editor tooling. GDScript is dynamically typed by default, garbage-collected, and exists primarily to make Godot’s engine features feel native to the scripting layer.

History & Origins

Godot Engine was created by Juan Linietsky and Ariel Manzur in Argentina and was used internally for several years before being released to the public. In February 2014, the engine was open-sourced under the permissive MIT license, and the Godot 1.0 release later that year brought GDScript into wide visibility as the engine’s first-class scripting language.

The decision to design a custom language — rather than embed an existing one such as Lua or Python — was deliberate. The Godot developers wanted a language whose semantics matched the engine’s object model exactly: nodes in the scene tree, signals, exported properties, the editor’s inspector, and the lifecycle of game objects all map directly onto GDScript constructs. They also wanted a language whose runtime was small enough to ship with a tiny engine binary, whose syntax would be familiar to newcomers, and whose tooling could be tightly integrated with the editor.

The Python-like surface syntax was a pragmatic choice: it is approachable to beginners, indentation-based blocks reduce visual noise in short game-logic scripts, and the language reads cleanly in tutorial videos and documentation. But GDScript intentionally trades Python’s vast standard library for engine integration: its built-in types (Vector2, Vector3, Color, Rect2, Transform, NodePath, …) are the types Godot uses internally, and they pass between the script and the engine with no marshalling overhead.

Design Philosophy

Several principles shape the language:

  • Engine-first. GDScript exists to script Godot. The language’s class system, property declarations (@export), signal declarations (signal), and lifecycle callbacks (_ready, _process, _physics_process, _input) mirror engine concepts directly.
  • Familiar surface, minimal ceremony. Indentation-based blocks, no semicolons, no header files, and an interpreter that integrates with the editor — beginners can write small scripts without first learning a build system.
  • Gradually typed. Annotations are optional; an untyped GDScript program runs identically to a typed one, but adding annotations improves static analysis, autocompletion, and runtime checks. Developers can adopt typing incrementally as a project grows.
  • Small and embeddable. GDScript’s runtime is part of the Godot engine binary. There is no separate VM to install, no package manager to configure, and no garbage-collection knobs to tune.
  • Reflection and tooling. The editor introspects GDScript classes to populate the inspector, dispatch signals, and offer autocompletion. Exported variables, type hints, and tool scripts all integrate with the editor’s UI without additional configuration.

Key Language Features

Hello, Godot

A minimal GDScript script attached to a node might look like:

1
2
3
4
extends Node

func _ready() -> void:
    print("Hello, World!")

extends Node declares the script’s parent class within Godot’s class hierarchy; _ready is a lifecycle callback called once when the node enters the scene tree.

Typed and untyped variables

GDScript variables can be left untyped (inferred dynamically) or annotated:

1
2
3
var health = 100              # untyped, dynamic
var speed: float = 250.0      # statically typed
var name := "Hero"            # inferred from initializer, statically typed

Function signatures may be similarly annotated:

1
2
3
func damage(amount: int) -> int:
    health -= amount
    return health

Signals

Signals are first-class in GDScript and provide the engine’s event-dispatch mechanism:

1
2
3
4
signal died(score: int)

func _on_health_depleted() -> void:
    died.emit(current_score)

Other objects subscribe with died.connect(some_callable), and the editor can wire connections visually without code.

Exports and the inspector

A variable annotated with @export is exposed to the editor’s inspector, so designers can adjust values without touching code:

1
2
@export var jump_velocity: float = 600.0
@export var enemy_scene: PackedScene

This is the mechanism that makes Godot’s scripting feel tightly integrated with its editor — the language has direct, declarative bindings to the engine’s UI.

Lambdas and callables (Godot 4)

Godot 4 introduced anonymous functions and a first-class Callable type:

1
var doubled := [1, 2, 3].map(func(x): return x * 2)

Callables can be stored, passed, connected to signals, and bound with extra arguments.

Typed arrays and dictionaries

GDScript supports typed collections in Godot 4:

1
var enemies: Array[Enemy] = []

The compiler enforces the element type on assignment and iteration.

Architecture

GDScript is implemented inside the Godot engine. It has its own compiler that produces bytecode for a small custom virtual machine, and the language interacts with the rest of the engine through Godot’s Object and Variant types. Built-in types such as Vector3, Color, and Transform are not boxed wrappers around external types — they are the types the engine uses internally, which keeps the scripting boundary inexpensive for the kinds of math-heavy operations games perform per frame.

Godot also supports other languages for scripting (notably C# through the Mono/.NET integration, and C++ through GDExtension, the engine’s native-binding API). GDScript remains the default and is the most common choice for new projects and tutorials, particularly when developers want the smoothest editor integration.

Platform Support

GDScript runs wherever Godot runs. According to Godot’s official documentation, the engine targets a broad range of platforms — desktop systems including Windows, macOS, and Linux; mobile platforms including Android and iOS; and Web export through HTML5/WebAssembly — along with several console platforms supported through third-party publishing partners. Because GDScript is embedded in the engine binary, a project that runs on a given platform has its GDScript code available there with no separate runtime to install.

For build automation and continuous integration, the community maintains Docker images such as barichello/godot-ci, but there is no official GDScript-specific image; GDScript is shipped as part of Godot itself.

Evolution

GDScript has changed substantially across Godot’s major releases:

  • Godot 1.x (2014–2015). Established the language’s Python-like syntax, dynamic typing, and tight integration with the scene tree and signal system.
  • Godot 2.x (2016). Refined the scripting model alongside engine improvements, but kept GDScript dynamically typed.
  • Godot 3.0 (2018). Brought a substantially overhauled runtime as part of the engine’s major upgrade.
  • Godot 3.1 (2019). Added optional static typing — the most significant single language change in its history — enabling annotations on variables, parameters, and return types.
  • Godot 4.0 (2023). A multi-year rewrite of the engine arrived together with a redesigned GDScript compiler, lambdas / anonymous functions, first-class Callable and Signal objects, typed arrays, and refinements to the annotation syntax (@export, @onready, @tool, …) replacing earlier keyword-based declarations.

Each release has preserved backwards compatibility within a major version and provided migration guides between major versions.

Current Relevance

GDScript’s relevance is tied to Godot’s. Over the second half of the 2010s and into the 2020s, Godot grew from a niche open-source engine into a widely discussed alternative to Unity and Unreal, particularly for independent developers and educational settings. Several factors contributed to that growth: Godot’s permissive MIT license, its small engine binary, its node-based scene model, and — relevant here — a scripting language that is approachable for beginners and well-integrated with the editor.

When Unity’s pricing changes in 2023 prompted many indie developers to evaluate alternatives, Godot — and by extension GDScript — saw a sharp uptick in attention and contributions. The language is now used in commercial games, educational curricula, game jams, and tooling. The Godot project funds ongoing GDScript development through donations, the Godot Foundation, and grants such as the one received from Epic MegaGrants in 2020.

GDScript is unlikely to spread outside Godot — that is not its design goal — but inside Godot it has become the default way to write game logic, with C# as a popular alternative for developers who want a more mainstream general-purpose language.

Why It Matters

GDScript is a useful example of a domain-specific scripting language designed for a single host application, in the lineage of Lua-in-engines, UnityScript (the discontinued JavaScript-like language Unity once supported), and the various proprietary scripting languages embedded in commercial engines. What distinguishes GDScript is that the host application is fully open source, which makes the language’s design choices, runtime, and tooling open to study and modification in a way most engine-embedded languages are not.

It also illustrates a pragmatic answer to a recurring language-design question: when you need an embedded scripting language, do you embed an existing one (Lua, Python, Squirrel) or design your own? Godot chose the latter, betting that the cost of building and maintaining a language would be repaid by the editor integration and the ability to evolve the language alongside the engine. A decade of releases, a growing catalogue of commercial games, and a thriving community suggest the bet has paid off.

Timeline

2014
Godot Engine is open-sourced under the MIT license in February 2014 by Juan Linietsky and Ariel Manzur; GDScript ships as Godot's primary scripting language with the Godot 1.0 release later that year
2016
Godot 2.0 is released, refining the GDScript language and the surrounding editor tooling and introducing the scene-instancing workflow that defines how Godot projects are organized
2018
Godot 3.0 is released, bringing a new rendering pipeline, a substantially overhauled GDScript runtime, and improvements to the language's integration with the engine's class hierarchy
2019
Godot 3.1 adds optional static typing to GDScript: variables, function parameters, and return values can be annotated with types, allowing the compiler and editor to provide stronger checks and better autocompletion while keeping the language dynamic by default
2020
The Godot project receives a grant from Epic Games' MegaGrants program, and adoption of Godot and GDScript continues to grow among independent developers
2023
Godot 4.0 is released in March 2023 after a multi-year rewrite; GDScript is updated with a new compiler, lambdas (anonymous functions), first-class signals and callables, typed arrays, and numerous syntactic refinements
2024
The Godot 4.x series continues with regular point releases (4.1, 4.2, 4.3), expanding GDScript's tooling, debugger, and language-server integration, and strengthening its position as the default scripting language for Godot projects

Notable Uses & Legacy

Godot Engine itself

GDScript is the primary scripting language for Godot, the open-source game engine. The vast majority of community tutorials, sample projects, and demo games distributed with Godot are written in GDScript, and the engine's editor is itself extended by GDScript-based plugins.

Brotato

The roguelite top-down arena shooter Brotato, developed by Blobfish and released in 2022, was built in Godot using GDScript and became one of the best-known commercial successes shipped with the engine.

Cassette Beasts

Cassette Beasts, a monster-collection RPG released in 2023 by Bytten Studio, was developed in Godot 3 with GDScript and is frequently cited as a high-profile example of a polished commercial title shipped on the engine.

Dome Keeper

Dome Keeper, a survival-mining roguelite by Bippinbits released in 2022, was developed in Godot with GDScript and reached a substantial commercial audience on Steam.

Cruelty Squad

Cruelty Squad, a stylized immersive-sim shooter by Consumer Softproducts released in 2021, was built in Godot using GDScript and became a cult success that helped raise the engine's profile among independent developers.

Independent and hobbyist game development

Beyond named commercial titles, GDScript is widely used by independent and hobbyist developers, in game-jam projects (notably Ludum Dare and GMTK Game Jam entries), and in classrooms teaching game programming, because Godot is free, lightweight, and ships with GDScript built in.

Language Influence

Influenced By

Python Lua Squirrel

Running Today

Run examples using the official Docker image:

docker pull
Last updated: