Building a Godot Save System for Our Platformer, a Devlog
Two weeks before our first public demo, a playtester finished world two, closed the game, and came back the next day to find themselves at the title screen with zero progress.

Two weeks before our first public demo, a playtester finished world two, closed the game, and came back the next day to find themselves at the title screen with zero progress. We had no real Godot save system, just a stub that wrote the current level number and nothing else, and it had silently broken when we renamed a scene.
This devlog covers how we rebuilt saving and loading for our platformer in Godot 4, what format we chose, the bugs we hit, and the one piece of popular advice we decided to ignore. It is written for small teams who need saves that work, not a perfect framework.
What our Godot save system needed to store
Before writing any code, we listed what a player would be angry to lose. The list was shorter than we expected:
- Unlocked levels and the best time on each, 24 levels in total
- Collected gems per level, as a set of IDs rather than a count
- Unlocked abilities: double jump, wall slide and dash
- Settings: volume sliders, screen shake toggle and key rebinds
- A save version number, which turned out to be the most important field
We deliberately did not save mid-level state. Our levels take two to four minutes, so restarting a level after quitting is fine. That one scope decision cut the work roughly in half, and it fits what we learned when cutting features to protect our schedule: the cheapest bug is the system you never build.
Choosing a format: JSON, ConfigFile or Resources
Godot gives you three reasonable options, and we prototyped all three in an afternoon.
| Format | Pros | Cons |
|---|---|---|
| JSON via FileAccess | Human readable, easy to diff, safe to load | Numbers come back as floats, no native Vector2 |
| ConfigFile | Simple sections and keys, good for settings | Awkward for nested data like gem sets |
| Custom Resource with ResourceSaver | Typed fields, editor support | Loading untrusted .tres files can run embedded scripts |
We went with JSON for progress and ConfigFile for settings. Settings live in a separate file so a corrupted progress save never wipes someone's key rebinds, and the reverse. Both files go in the user:// folder, which Godot maps to the correct per-platform app data location on Windows, macOS and Linux.
How the save and load code works
Everything runs through one autoload singleton called SaveManager. Gameplay code never touches files directly. It calls SaveManager.mark_level_complete or SaveManager.add_gem, and the manager decides when to write.
Saving
The save function builds a Dictionary, converts it with JSON.stringify, and writes it with FileAccess.open in WRITE mode. The key detail is that we write to a temporary file first, named progress.tmp, then rename it over progress.json using DirAccess. If the game crashes or the laptop dies mid-write, the old save is still intact. Before we did this, one tester's save got truncated to 0 bytes after their battery died.
Loading
Loading reads the file with FileAccess.get_file_as_string, parses it with JSON.parse_string, and checks the result is a Dictionary before touching it. Every field is read with a default, so a missing key means "use the starting value" instead of a crash. Gem IDs are stored as strings, and numbers like best times are cast back with int or float explicitly because JSON returns every number as a float.
When to write
We save on level complete, on returning to the world map, and when settings change. We do not save every frame or on a timer. Writing a 3 KB file takes well under a millisecond, but we did not want disk activity in the middle of a tight jump.
Bugs we hit along the way
The first was the original problem: we had saved scene paths like res://levels/world2/level_3.tscn as level identifiers. Renaming a folder broke every save. The fix was a stable string ID per level, set in the level's root node, that never changes even if the file moves.
The second was float drift on best times. A time of 47.32 seconds came back as 47.319999. Storing times as integer milliseconds solved it and made comparisons exact.
The third was web export. On HTML5 builds, user:// maps to browser storage, and some testers in private windows lost everything on close. We added a small notice in the web build's menu explaining that. It is not a code fix, but it stopped bug reports. If you are chasing performance issues alongside saves, our frame rate devlog covers the profiler workflow we used for both.
The counter-take: do not encrypt your save files
Many Godot tutorials suggest FileAccess.open_encrypted_with_pass to stop players editing saves. For a single player indie game, we think that is wasted effort. The password has to ship inside your game, so anyone determined can find it. Meanwhile, encryption makes your own debugging harder, because you cannot open a tester's save in a text editor to see what went wrong.
Players who edit a single player save to unlock a level are not hurting anyone. Testers who can send us a readable file are helping us. We chose readability, and in the first week it saved us at least three hours of guessing.
Versioning saves so updates do not break them
Every save has a version field, starting at 1. When we added the dash ability in a later build, we bumped it to 2 and wrote a small migration function: if version is 1, add dash_unlocked as false and set version to 2. The loader runs migrations in order until the save is current. It is about 20 lines of code and it means old saves keep working after every update.
We also keep one backup. Before every write, the previous progress.json is copied to progress.bak. If the main file fails to parse on load, SaveManager tries the backup and shows a small message that the last session may not have been saved. In two months of public builds that fallback has fired twice, and both players kept nearly all their progress instead of starting from zero.
Total time for the rebuild was four working days for one programmer, including testing on three platforms. More progress notes from our projects are collected in the devlogs section.
Frequently asked questions
Where does Godot store save files?
Godot writes anything under user:// to a per-user app data folder. On Windows that is inside AppData under Godot or your project name, on macOS in Application Support, and on Linux under the local share folder. For web exports, it maps to browser storage.
Is JSON good enough for a Godot save system?
For most small and mid sized games, yes. It is readable, safe to load and easy to version. You just need to convert numbers back to the right types and store things like vectors as simple arrays or separate x and y fields.
Should I use Resources for save games in Godot 4?
Resources are convenient and typed, but loading a .tres or .res file can execute embedded scripts. That is a risk if players share save files online. If you use Resources, only load files your own game wrote, or choose JSON instead.
More in Devlogs
Devlogs
Adding Sound and Music to Our Godot Game, a Devlog
We shipped the platformer demo to eleven playtesters with no audio at all, because audio was the thing we kept pushing to next...
Devlogs
Adding Godot Screen Shake and Hit Stop, a Devlog
The most upvoted comment in our last feedback thread was four words long: "hits feel like nothing." Eleven other players agreed...
Devlogs
Adding Controller Support to Our Godot Game, a Devlog
Three of the first ten people who played our demo picked up a gamepad, pressed A on the title screen, and nothing happened.