Spielerando

Saving

Learning paths through this topic

Actions done offline are sent back later and some of them no longer make sense

A player keeps playing on a train with no signal, and when the game reconnects it has a long list of things they did. Here is how the server checks that list one by one, which parts it believes, and why a refused action must not stop the rest.

A slow connection makes the game send a purchase twice and charge twice

When an answer gets lost, the game asks again, and the server cannot tell a retry from a second purchase. Here is how every request carries a mark, what the server remembers about it, and why that memory has to be saved with the player.

Rolling back a griefed area hands out duplicated items

Restoring a chest area from an old backup is easy, but players have moved things in and out since then. Done naively, the loot of honest players exists twice, deposits vanish and the thief keeps the prize. Here is the bookkeeping that avoids all three.

A hand-edited or damaged save gives a hero more attribute points than the level allows

Players edit save files, and bugs write odd numbers. A hero can load with far too much strength or with points that went missing. Here is a quick check on loading that works out what the level should allow and puts the difference right.

Autosaves overwrite the last good save from before the player's fatal decision

The player realizes an hour too late that a choice ruined the story, and every autosave already contains the mistake. Here is a small rotating set of autosaves, plus a few saves that are never overwritten, and how to skip a save when nothing changed.

Season and day of the festival drift when the length of a season is changed

Saving the date as year, season and day looks natural, until an update makes seasons longer and every stored date lands somewhere else. Here is what single number to keep, how to turn it into a date, and how to move old dates across a change.

The collection counter shows over a hundred percent or never reaches it after an update

You add, remove or rename collectibles, and old players are suddenly at an impossible number or stuck one short. Here is how to count only what still exists, count a renamed piece once, and avoid showing a full score before it is really full.

A character stands frozen because the saved conversation line no longer exists

You rewrite a dialogue after release, and players who saved in the middle of that talk load into a line that is gone. The game hangs or shows nothing. Here is what to save and how to find the closest place to pick up.

A morning event fires twice on loading, or is skipped after sleeping several days

Markets open, guards change, a messenger arrives at dawn. When the player saves exactly at that moment or sleeps through days, events repeat or vanish. Here is the one number to save and how to count what is due, including when to merge several missed days into one.

Random dungeon floors look different depending on which floor the player visited first

If every floor is made one after the other from a single stream of random numbers, going down a different way, or loading in the middle, changes every floor below. Here is how to give each floor its own number and keep floors already seen even after the generator is improved.

Loading a save drops the hero right next to alert enemies who strike at once

A save made in the middle of a fight loads into the same fight, but the player has not had a second to look at the screen. Here is a simple calm-down step for enemies that are close, how far they go back, and how long the hero is safe after loading.

The map of what the player has explored makes the save huge

Remembering for every square whether the player has been there is a lot of yes and no. Written out plainly it fills the save with repeats. Here is a way to store it in a handful of numbers, and a check that refuses a damaged map instead of showing a wrong one.