Saving
Learning paths through this topic
A big world makes the save huge when only a few tiles were ever changed
Saving every tile of a large map wastes space and time, and it also freezes old map mistakes into every save. Here is how to save only the player's changes, how to bring them back, and what happens when you later fix the map itself.
Loading a save changes what the next chest or attack roll gives you
If chance is not part of the save, players can reload again and again until the lucky result appears, or see the same early rolls repeat. Here is how to make chance repeatable and tied to the save, and to keep unrelated rolls from shifting each other.
The load screen shows empty slots, broken slots and "Continue" loads the wrong one
A good load screen tells at a glance which slot is which, warns before overwriting, and offers a Continue button that picks the right save without asking. Here are the small rules that get this right, including damaged slots.
Saving fails or duplicates characters when they hold each other, like an owner and a pet
When two things in the game know about each other, a naive save either refuses to run or writes the same thing twice, and after loading they are strangers. Here is how to save links and rebuild them so shared things stay one thing.
Crops and cooldowns freeze or jump wrongly when the player closes the game and returns
Things that grow or recharge over time need a decision about the hours the player was away. Done carelessly, they either stop, finish instantly, or can be cheated by changing the clock. Here is a safe way to settle the time away.
After an update, old saves load with missing items or crash the game
Every time you rename or reshape something your game stores, saves made before that day stop fitting. Here is a way to let every old save grow up step by step, and what to do with a save from a newer game than the one running.
A new season resets everyone and players riot because their long work is gone
Online games that start fresh every few months need to decide what travels over, and do it exactly once per player even if the job runs twice or a player is away for a whole season. Here is a way to carry some value over without breaking the new start.
The server freezes for a second every time it autosaves a full lobby
Saving everybody at once is simple and makes the whole game stutter on a regular beat. Here is how to spread the work over many moments, who goes first, and the one rule that keeps someone from waiting far too long.
After a world update, old building and terrain edits land in the wrong places
Worlds that are created from a seed and save only what players changed break when the creator of the land changes: a removed tree is gone from a place that now has none, or a house floats over a new lake. Here is how to keep edits meaningful.
A player drops out in the middle of a trade and the item is in both bags
Swapping items between two players looks like one action but is several, and a lost connection or a quick last-second change can leave things duplicated or missing. Here is the order of steps that keeps every item in exactly one place.