Description #
GDScript is a high-level, dynamically typed scripting language designed specifically for the Godot game engine. Its Python-like syntax is easy to learn and deeply integrated into Godot, making it ideal for rapid game development.
History #
GDScript was created by Juan Linietsky as part of the Godot engine project. Development began around 2014 when the Godot engine was open-sourced. GDScript was built to optimize performance and ease-of-use within the engine, avoiding the overhead and integration challenges of using general-purpose languages.
Hello World Code #
extends Node
func _ready():
print("Hello, World!")
How to Run #
Option 1: Online
- GodotPlayground – Run GDScript in the browser
- Replit GDScript Template
Option 2: Local
- Download and install Godot
- Create a new project and script:
- Add a
Node
scene - Attach a new script with the sample code above
- Add a
- Press Play to run the game and see output in the console.
Key Concepts #
- Tight integration with Godot Engine
- Python-inspired syntax
- Dynamically typed with static typing support
- Object-oriented with classes
- Signals for event handling
- Scene-based architecture
- Built-in functions for UI, 2D, and 3D
- Lightweight and fast
- Strong debugging tools
- Designed for real-time games and tools
Try It Online #
Fun Facts #
- GDScript is faster in Godot than Python due to custom optimizations.
- Godot’s dev team rejected Lua and Python in favor of building GDScript.
- Godot 4 introduced static typing and major GDScript enhancements.