I’m always impressed about the save mechanism in Fallout 4. You can literally store thousands of things in hundreds of containers all over the world. Plus you can build dozen of settlements and even place items there. In addition to that you can have a huge amount of save games.
Same applies to Minecraft. As simple as it looks every save contains the information of thousands of blocks. I guess it’s probably really simple. The game probably just saves every location of a block. Like a big ass log with informations like on 3x 35y -20z there is a block of sand. But still impressive.
Saving is actually not that hard as you may think.
Your game anyway need to keep somewhere current state – your stats, exp, choices in dialogs, your position, etc.
Dropping all of it into one file is not hard. Maybe finding all this places where each part is stored would be hard, so you may miss something. But that’s why you have testing department.
For most games, saving is done at particular checkpoints so that you don’t notice the discrepancies and they mostly just load the world from those checkpoints the exact same as if it were a completely new level, make any story-related changes (like one other poster said, the game keeps track of flags and variables), reload your inventory, etc. But by and large most games don’t ‘save’ every single little detail and reload essentially as much of a blank slate world as they can get away with.
Bethesda games on the other hand, have the world as-is from your disk drive as a starting point, and then when you save they record all the *differences* between your current world state and the world’s on-disk state that you got from steam or a CD or whatever. Then when you reload the game, they load the world from disk, then apply each of those *differences* one-by-one. This is part of the reason they’re so easy to corrupt, but also, the worlds are gigabytes in size, you don’t want to also have gigabytes of save files as well, so just keeping track of just the differences is an easy way to store that fully dynamic save data.
I’ll try an actual ELI5:
Imagine you’re going about your day, but today is an important day and you need to remember everything you did, so you can do it again tomorrow. So what you can do is write down everything you do, so you have a clear list of things to follow the next day.
You don’t need to write down *everything* like every footstep you take, so you only take note of things that are actually important. Like, I made coffee, and added milk and sugar.
In principle, that’s how many save game systems work as well. You write down everything that is important, so when you go to recreate the same day, we just put everything that is important in its proper place, like the fact that you have a cup of coffee, with milk and sugar waiting on your desk.
Some games make note of more things, some games need to make note of fewer things. It all depends on the type of game and the specific design of those areas of the game. For example, your game might only have one type of coffee, with no milk and sugar as an option, so it only needs to write down that you made coffee.
In addition to all the other answer, I’d like to add that “all element/events in correct order” (in think you meant in correct state) is really not that much information and easily handles by computers.
Let’s take a game like the witcher 3: the game has 70,000 lines of dialogue. If you store a boolean for each line (meaning already seen / not seen yet), that 70,000 bit or 8.75 kilobyte : really not a big file… Of course, the game has much more than just read flag for dialogue, but you get the idea : storing state of quest (not started, started, done) or inventory (~100 items, designated by an ID in the save) is not a lot of infos.
In a game like crusader king 2, the save file is actually plain text, so you can look a it and modify it if you want to cheat (or debug…). Late in game, the save file contains the description of hundreds of characters, titles, relations… That makes up to less than 200MB, and ~700,000 lines in my case. That big, but really nothing a computer can’t handle (and it could be greatly reduced if not stored in plain text but computer friendly format instead. The dev probably preferred plain text for simplicity). You can get an idea of how the save file stores data in ck2 by looking at this wiki [https://ck2.paradoxwikis.com/Save-game_editing](https://ck2.paradoxwikis.com/Save-game_editing)
Luckily the Game community is pretty open on how technology works, Horizon New Dawn programmers have done multiple videos on their technology. This is interesting because they converted a simple save game system like used in Kill Zone to something much more advances like is used in Horizon New Dawn.
[https://youtu.be/ucTeAWv5DX8?t=951](https://youtu.be/ucTeAWv5DX8?t=951)
[https://youtu.be/ucTeAWv5DX8?t=1879](https://youtu.be/ucTeAWv5DX8?t=1879)
TLDR; Horizon New Dawn: All important objects are stored in Database, everything not is not stored
Kill Zone: Every object position / status is saved out to save game.
I mean, yeah, all of that exact state of the game is already saved in memory while you’re playing, so they can simply dump that into a save file and load it back into memory. There are all kinds of things they can do to simplify that process and shrink the size of the save files but that’s essentially how they do it.
It is already keeping track of all this data at all times. How would the game be able to function if it wasn’t?
Some data is removed as you play. Ever wonder why the bodies of dead enemies often disappear after a while?
Saving a game, as others have said, is simply recording the information you already have in a nice format. Sometimes removing information that is not essential to keep between saving/loading.
Also, as others have said, for the most part this is not all that much information. It’s mostly just a bunch of numbers and true/false values, which are stored very efficiently. It takes up just about no space compared to for example video.
Latest Answers