Skip to main content
Coding Quests

Godot Save System

Saving the player's position is the easy part. The hard part is the world: the potion you picked up must stay gone, and the chest you opened must stay open. Here each object saves itself, so there is no central list of everything to save.

Free Godot 4.7 project · MIT licensed · v1.0.0

No account needed. Or download the v1.0.0 ZIP directly.

Collecting potions, opening a chest, saving, collecting more potions, then loading the save so the room goes back.

What is in it

  • Save slots, each a folder with the game data and a small summary file for your load menu.
  • Crash-safe writes. Each file is written to a temporary file first and then renamed, so a crash mid-save cannot corrupt a slot.
  • Any node in the persist group saves and loads itself with two methods.
  • Collected items and defeated enemies stay gone after loading.
  • Loading mid-game reloads the scene first, so items you picked up after saving come back.
  • Versioned saves, with a hook for upgrading old save files when your format changes.
  • Failed saves and corrupt files are reported to your code instead of crashing the game.

Quick start

Download the project from GitHub and unzip it. In the Godot Project Manager, click Import and pick the project.godot file inside the folder.

  1. Press F5.
  2. Move with WASD or the arrow keys and collect a couple of potions.
  3. Press E next to the chest to open it.
  4. Click Save on Slot 1.
  5. Collect more potions, then click Load on Slot 1. The room goes back to how it was.

The README on GitHub explains how each part works and how to copy it into your own game.

Compatibility and limits

Made for
Godot 4.7, standard build. GDScript only, no .NET needed.
Tested on
Godot 4.7.2 stable, on Windows. Earlier versions of Godot 4 are untested. Loading mid-game uses SceneTree.scene_changed, which needs Godot 4.5 or later.
Renderer
Compatibility
Code license
MIT. You can use it in commercial games. Read the license
Art and fonts
Knight, chest and potion sprites from Kenney's Tiny Dungeon pack (CC0 1.0).
Release
v1.0.0, commit 417e8ba, published 2026-10-03

Known limits

  • Saved objects are matched by their scene path, so give them unique names.
  • Nodes spawned while the game runs, like dropped loot, are not recreated on load. Save them as data in a parent node.
  • Saves are plain JSON, so players can read and edit them.
  • A save covers the current scene only.

Learn to build it

Copying a system works until you need to change it. These quests build it with you, one small step at a time. You write the GDScript in your browser and each step is checked before you move on.

Save + Load System

Builds this save system lesson by lesson: slots, crash-safe writes, the persist group pattern and versioning.

First 4 lessons free

See all the free Godot projectsReport a problem with this project