Back to all writing

My Game Had to Remember Yesterday Before It Could Have a Tomorrow

Game Dev Series•Part 22•6 min read•By Mikhil

A game about consequences cannot forget what happened the moment the player closes the window. That should be obvious. In practice it turned into one of the least glamorous and most important stories from the first Block by Block builds.

The early prototype had missions, money, purchases and a small amount of ongoing world state. Each new interaction made a save file responsible for a little more than the player's position. The more state I introduced, the easier it became for a “successful” save to leave something important behind. Later I did something even more disruptive: I replaced the geography on which those saves had been created.

So there were two different problems hiding behind the same button: remembering what the player had earned and making that memory safe when the world changed around it.

The first promise was that progress would stay

A save system became meaningful as soon as it carried transactions, destinations and a player's ongoing work. It was no longer merely a way to reopen the game in the same location.

The save feature also changed how I thought about testing. Once state persisted, I couldn't rely only on a fresh project with all variables at their defaults. I needed to load a game midway through a task, after buying something and after visiting a different location. I needed to check what happened when the next version introduced a new field or moved a building. This was much less dramatic than adding a character, but it made every feature more real. A system that only works in the first five minutes of a brand-new session is closer to a demonstration than a dependable game.

The project changed so quickly that a saved game could outlive the physical map in which it was created. An earlier layout might put the player at a place that later became a wall. An older save might be missing a field that a newer version expected. The initial source documentation explicitly called out preserving the local save path and migrating older state rather than demanding that every update begin with a new game.

A reliable restore is also a test of cause and effect. Imagine buying something, saving, closing the game and returning to find the money gone but the item missing. Both individual systems might claim to have done their job, yet the player has been cheated by the state between them. That's why the save needed to represent coherent progress rather than an arbitrary selection of variables. The early prototype was simple enough to inspect manually, which made these problems easier to understand before a larger world introduced far more state and interactions.

The backup mattered before disaster

One repaired path concerned an unsafe write/restore situation. The important part of the story is the precaution, not a fictional tale of somebody permanently losing an entire campaign.

Even a backup file only helps if recovery behavior is understandable. The game needs a defensible order of preference between a current save and an older copy, and it needs to avoid turning a damaged value into a normal one without explanation. Those are complicated implementation questions behind a very simple user expectation: when I save, my progress should be there next time. I don't plan to publish private save formats or security-sensitive implementation details here. The interesting public lesson is the same either way. Preserving a player's time is a design obligation, not optional housekeeping.

The save work went through early repairs for a reason. A file can exist and still be the wrong file to load. A write can be interrupted. A user can have an older schema with fewer fields than the current version. An apparently successful save can preserve a dangerous player location. The right answer isn't to declare every one of those events likely; it's to stop assuming the happy path is the only path.

The source history establishes that save and migration logic were implemented and audited. It does not support a story about a real player permanently losing weeks of progress, so I won't turn the risk into a fake disaster. The more accurate story is that I identified how a naive save path could fail and changed the system before allowing that failure to be normal.

A new map was not a new life

When terrain, streets and buildings moved, an old save could still point to places that no longer existed. Preserving legitimate progress meant dealing explicitly with unsafe old positions rather than allowing the player to load into a wall or empty space.

The migration also made version tracking feel less bureaucratic. A save belongs to a world built from assumptions: where the streets are, which objects exist and what actions are possible. Change those assumptions and the program needs a plan for what to preserve. I started treating layout revisions like changes to the rules of an ongoing story. The player's progress should remain meaningful even if the map's exact coordinates do not. That is a much more careful way of rebuilding a world than assuming a saved position is timeless. The player shouldn't have to understand the file format to benefit from that care.

The compatibility approach retained useful progression but allowed a one-time relocation to a known-safe position when a layout transition required it. That's very different from wiping the player's history. The early v0.9 records explicitly mentioned preserving progress while migrating a problematic old location, and later game versions kept testing save/restore through environmental revisions.

Save migration also gave me a useful definition of compatibility. It wasn't necessarily preserving the exact old image of the world. The world was changing on purpose. Compatibility meant carrying forward the player's meaningful accomplishments and handling location-specific changes transparently. That distinction became more valuable as city versions diverged. If I could protect progress while rebuilding a neighborhood, I was free to improve the environment without treating every old save as disposable. The player shouldn't have to pay for the developer's revisions by starting over whenever a sidewalk moved.

What saving really meant

There is a boring kind of engineering that I have come to respect more than spectacular features. A well-handled failure does not create a screenshot worth sharing, but it allows the rest of the game to be trusted. A cautious save migration can preserve hours of progress that no new texture will ever replace.

I don't want to overstate the result. The early project did not emerge with a certified, future-proof save architecture for every system imaginable. It did develop specific backups, validation checks and migration behaviors for the situations we actually encountered. That is the real story: before the world could become larger, the things the player had already done needed a chance to survive.