Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  

Save Games: How do they work?

Recommended Posts

For those more technically minded than myself, what gets stored in a save game file, and how do they work? I have often wondered about this.

Share this post

Link to post

If it's Eternity, then it's simple: Data is (re)written, data is read. By data, I mean ammo, health, map etc.

By "map" I'm not sure what it means, probably things, subsectors and all that jazz.

Share this post

Link to post

In Doom, just about everything; especially in bug-fixing ports.

Stuff that's not stored in savegame anywhere that I know off include the state of animated textures (consequence) and the position in the currently-played music file.

In vanilla there are several gameplay-relevant fields that are either not stored, or stored but not read. This explains issues such as this or this.

Share this post

Link to post

Thanks guys. Some more questions for the panel, just out of curiosity.

So does a savegame save, for example floor and ceiling heights that do not change and cannot be changed during the course of a level? It must store floor and ceiling heights that do change (lifts, crushing ceilings etc.) Does it store the positions of things that are not affected by gameplay (trees, lamps etc). Does it store light levels that cannot be changed, or only the light levels of sectors that can have their light level changed?

This last one is probably a lolworthy question, but would it be possible to make a 'partial' savegame that stored most things but was able to ignore if some things were different? This would be very useful when testing a map. If you made a few changes to the map, then you could reload it and continue from a save point. Probably there are some very good technical reasons why this can't be done, but me not being a l33t Haxor and all, I figure I would ask.

Share this post

Link to post

JVanilla Doom saves all of the following: player status, linked mobj list, sector heights and textures, and the status of some special sectors. It is actually a detailed marshaling and unmarshaling process, rather than a straight memory dump, and some information does get lost in the process or is not fully recuperated.

E.g. loading a game back does not restore full infighting information, even though that information is, in fact, recoverable. Mocha Doom is in fact capable of reconstructing infighting from standard vanilla savegames.

The other problem is that not all special effects are handled.

As for your question, monsters and things would be the easiest to ignore, but sectors are stored by strict sequential sector number, and any change in order or number would cause a crash or at least mess the map up. BTW, savegames from different maps with the same number of sectors should in theory be compatible (in vanilla) but leading to unpredictable outcomes.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this