Interactive Lab Quest

Code Sandbox

Practice GDScript structure, typing, exports, and static checks in the browser.

10-20 min Practice first Godot 4.6

GDScript Code Sandbox

Practice GDScript snippets in a browser editor with syntax highlighting and saved snippets. Real GDScript execution requires the Godot editor — this sandbox is for reading, editing, and copying patterns. Pair it with the GDScript cheat sheet and our typed recipe library.

🧪 Live GDScript editor

Practice GDScript snippets in a browser editor. Full execution still belongs in Godot.

Practice Editor
📚 Examples
📄 player_movement.gd GDScript
extends CharacterBody2D

@export var speed := 300.0
@export var jump_force := -400.0

var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")

func _physics_process(delta: float) -> void:
# Apply gravity
velocity.y += gravity * delta
# Jump when on floor
if Input.is_action_just_pressed("jump") and is_on_floor():
velocity.y = jump_force
# Horizontal movement
var direction := Input.get_axis("move_left", "move_right")
velocity.x = direction * speed
move_and_slide()
🏃

Player Movement

Basic platformer movement with jump

Static Checks

  • Declares a Godot base node
  • Uses typed GDScript or inferred typed values
  • Includes a Godot lifecycle, signal, or scene API

📝 Key Concepts

  • CharacterBody2D - Physics body for player control
  • move_and_slide() - Built-in movement function
  • is_on_floor() - Ground detection
  • @export - Expose to Inspector
Tutor Checkpoint

Lock the pattern in

Before jumping to the next page, turn the idea into one tiny scene or script. That is where the Godot habit sticks.

Unity habit

Translate one C# script habit at a time instead of rewriting a full controller.

Unreal habit

Convert one Blueprint event chain into a small function.

Godot habit

Prefer short functions, typed variables, and exported tuning fields.

Try this

Write a HealthComponent with one signal and two exported values.