One project, clear restore points
At each green Save marker, duplicate the entire project folder before beginning the next lesson or system.
Studio protocol
At each green Save marker, duplicate the entire project folder before beginning the next lesson or system.
Add one node, property, or code block; press Play; observe; then continue.
Definitions of done require a demonstration, explanation, recording, or test result—not only checked boxes.
Complete the required behavior first, then change one rule and explain the effect.
res://scenes, scripts in res://scripts, levels in res://levels, UI in res://ui, data in res://data, and media in res://assets. Clear ownership prevents broken paths later.Core build sequence
Complete these in order. Each lesson supplies a dependency the next lesson needs.
Interactive systems lab
Press a player action. Watch which systems receive the event, what data changes, and what the player sees. This is the same event-driven thinking you will use with Godot signals.
Optional system studios · 09–14
These are independent upgrades, not a longer prerequisite chain. Open a studio to see the model, smallest useful code, a test, and a remix.
An inventory is data first. Keep item definitions (name, icon, description) separate from the player’s changing quantities. The inventory owns the numbers and emits changed; the UI listens and redraws.
extends Node
signal changed
var items: Dictionary = {}
func add_item(id: String, amount := 1) -> void:
items[id] = items.get(id, 0) + amount
changed.emit()
func remove_item(id: String, amount := 1) -> bool:
if items.get(id, 0) < amount: return false
items[id] -= amount
if items[id] == 0: items.erase(id)
changed.emit()
return trueTest: Add two berries, consume one, reopen the menu, and prove the quantity is 1. Remix: Add a capacity rule or item categories.
Write only data that must survive closing the game: unlocked levels, inventory quantities, quest states, settings, and position at a safe checkpoint. Do not save velocity, timers, or temporary visual effects.
user://save.json.const PATH := "user://save.json"
const SAVE_VERSION := 1
func save_game() -> void:
var data := {"version": SAVE_VERSION,
"inventory": Inventory.items,
"quests": QuestLog.states}
var file := FileAccess.open(PATH, FileAccess.WRITE)
file.store_string(JSON.stringify(data))
func load_game() -> Dictionary:
if not FileAccess.file_exists(PATH): return {}
var data = JSON.parse_string(FileAccess.get_file_as_string(PATH))
return data if data is Dictionary else {}Test: Save, close the whole game, reopen, load, and compare values. Also test no save file and one missing key. Remix: Add three save slots.
Use named rates per second, clamp every meter, and give the player at least one reliable recovery action. Update continuous needs with delta; use timers for discrete ticks such as damage.
A visible rate lets the player predict when to act.
signal hunger_changed(value: float)
@export var hunger_rate := 0.8
var hunger := 100.0
func _process(delta: float) -> void:
hunger = clampf(hunger - hunger_rate * delta, 0.0, 100.0)
hunger_changed.emit(hunger)
func eat(nutrition: float) -> void:
hunger = clampf(hunger + nutrition, 0.0, 100.0)Test: Compare hunger after 30 seconds at different frame rates; results should match. Remix: Make sprinting drain hunger faster, then playtest whether the choice feels fair.
Use stable IDs rather than display text. A quest moves from LOCKED to ACTIVE to READY to COMPLETE. Dialogue reads that state and chooses the right line; it should not secretly own quest progress.
signal quest_updated(id: String)
var states := {"repair_radio": "locked"}
func start_quest(id: String) -> void:
if states.get(id) == "locked":
states[id] = "active"
quest_updated.emit(id)
func report_event(event_id: String) -> void:
if event_id == "radio_part_collected" \
and states["repair_radio"] == "active":
states["repair_radio"] = "ready"
quest_updated.emit("repair_radio")Test: Collect the part before and after accepting the quest. Decide intentionally whether both orders work. Remix: Add an optional objective that changes the reward.
Use AnimationPlayer for a short timeline and method tracks for events. Disable player input—not the whole process—switch cameras, play the sequence, then restore everything from one cleanup function. A skip button should call the same cleanup.
func play_intro() -> void:
player.input_enabled = false
cutscene_camera.current = true
animation_player.play("intro")
await animation_player.animation_finished
finish_cutscene()
func finish_cutscene() -> void:
animation_player.stop()
player_camera.current = true
player.input_enabled = true
QuestLog.report_event("intro_seen")Test: Finish and skip the scene. In both cases, movement, camera, UI, and quest state must recover. Remix: Trigger subtitles with AnimationPlayer call-method keys.
Store recipe inputs and output as data. First validate every ingredient; only then remove inputs and add the output. This prevents half-finished crafts when an ingredient is missing.
func can_craft(recipe: Dictionary) -> bool:
for id in recipe.inputs:
if Inventory.items.get(id, 0) < recipe.inputs[id]:
return false
return true
func craft(recipe: Dictionary) -> bool:
if not can_craft(recipe): return false
for id in recipe.inputs:
Inventory.remove_item(id, recipe.inputs[id])
Inventory.add_item(recipe.output_id, recipe.output_amount)
return trueTest: Try exact, extra, and insufficient ingredients. No failed attempt may remove an item. Remix: Unlock a recipe as a quest reward.
Interactive project planner
A genre does not require every familiar feature. Pick the smallest system set that can prove your idea is fun.
Suggested pacing
Play or inspect the system students are about to build. Name the player-facing purpose.
Trace the node tree and data owner, then read the smallest useful code example together.
Students follow checkpoints and run the game after every successful change.
Students change one variable or rule, test it, and explain the resulting behavior.
Final definition of done