How do people design the save game feature in large/complex games?

1.13K views

The save game feature seems simple but it’s mind-blowing how it can return the exact state of a game with all elements/events organised in the correct order. Can anyone explain how it works?

In: 668

39 Answers

Anonymous 0 Comments

Not sure about others but here’s how I do it.

Make everything you need to save into an easy to record number. For example: You need to save where a player is physically in your game but you have a bunch of areas so one number for their position isn’t gonna cut it. Break it down and save what area the player is in by assigning each area in your game an ID (Forest = 0, Cave = 1, Ocean = 2, etc.). Then you just have to save their position within that area. So you end up saving two values for where the player is in the game physically.

As for items/inventory; assign IDs to every item a player could possibly have in their inventory. Then you’re just saving that number and when the game re-loads the inventory it knows what numbers to load as what items.

As for story progress, that’s just a checklist of story flags. Each time a player has hit a key part of the story check it off the list. So when you load that player’s save, you just check what they’ve reached and what they haven’t reached to determine where to put them in the story.

Again, this is just how I do it, not saying it’s the only way to do it.

Hope this was insightful!

You are viewing 1 out of 39 answers, click here to view all answers.