How would you design a save game system?
What the interviewer wants to hear
- Decide what state to save; separate save data from runtime objects
- Serialise to a format like JSON or binary with a version number
- Use stable IDs to restore references
- Write safely: temp file then rename, backups
- Handle versioning/migration, platform storage and cloud saves
Model answer
I start by deciding exactly what needs saving, such as player stats, inventory, quest progress and world changes, and I keep it in plain save data classes, separate from GameObjects or Actors. Each saveable object has a stable unique ID so I can restore it and its references on load. I serialise to JSON during development because it is easy to read, and maybe a compact binary format for release. Every save file includes a version number, so when the game updates I can migrate old saves instead of breaking them. To avoid corruption if the game crashes during saving, I write to a temporary file and then rename it, and keep a backup. Finally I use each platform save API, support cloud saves, and test loading old saves in CI.
Can you answer it under time pressure?
Take a timed medium round and get scored on every answer.
More medium Game Developer questions
- Your game runs at 40 FPS but must hit 60 FPS. How do you find and fix the problem?
- How would you build the AI for an enemy guard that patrols, notices the player, chases and attacks?
- How would you choose between Unity, Unreal and Godot for a new project?
- How do you make game systems easy for designers to tune without changing code?
- How would you build a third-person camera that follows the player smoothly and does not clip through walls?
- Players report that their character sometimes falls through the floor. How do you investigate and fix it?
- How would you design input handling that supports keyboard, gamepad and touch, plus key rebinding?
- How would you procedurally generate dungeon levels that are always playable?
- Describe how you would design a reusable object pool and what trade-offs it has.