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

A new method for saving Doom games

Recommended Posts

How many times were you trying to record a doom demo, only to screw up at some delicate point, and wished that you could go back, correct your errors and produce a final demo that appears as a smooth continuum between your load/save points? Too bad that traditional game saving methods (dumping all relevant state to disk) and demo recording (player movements) doesn't allow for this...at least not directly.

The way I see it, nothing prevents a source port from saving *player input* instead of game state. At the beginning of each map, important things like the various RNG seeds are logged, and then all player movements are logged as if it was a demo recording (essentially, the same mechanism used for recording demos would always be active).

However, when saving a game, instead of the actual state, only the insofar logged input would be saved to disk, along with the exact time (in game ticks) the saving occurred.

When loading, the map would be reset to the original state and then the player's progression would be "played back" with no screen rendering and at an accelerated time (as fast as possible), in order to get back to the "saved" point, at which point the player would regain control. At the completion or end of a stage, the complete input log would be saved as a normal demo, however when loading a game, the input logs are *purged* and logging continues from the restored point.

Potential benefits:

  • Possibility of a frame-by-frame game analysis and manipulation
  • The ability to produce flawless demos by retrying
  • Since demos and savegames would not be distinct, everybody could
    resume another player's gameplay from any point he likes. Collaborative demos!
  • Potentially smaller save files, especially with very large maps
Potential cons:
  • The method relies on the assumption of Doom games being perfectly deterministic. However there are source ports out there which have serious issues with demos (ZDoom...) and there are subtle breakage factors everywhere.
  • It may take a long time to load certain long games on large maps, possibly even minutes, instead of loading the state directly.
  • I don't know how well actual demo logging handles scripting, but that would also have to be perfectly simulated during loading.

Share this post


Link to post

And here's the killer:

Maes said:

The method relies on the assumption of Doom games being perfectly deterministic. However there are source ports out there which have serious issues with demos (ZDoom...) and there are subtle breakage factors everywhere.

Share this post


Link to post

A far better approach in a client/server model is to simply treat a demo as a client and get it to write the incoming traffic to a file. Then when you want to play the demo, treat it as a server.

Naturally there is still potential desyncs if something fundamental is changed but altered playsim logic won't affect anything (there are exceptions of course but I won't go in to that).

This is the way demos work in Doomsday.

However there is one big stumbling block with a new demo format and that is that the community will continue to use the original demo format, so that they can play the demo with DOOM.exe.

Doomsday has had it's far more advanced demo system for many years yet very few demos have ever been released in the new format and those that have, made zero use of the new features. The only Doomsday demos that I have seen that make use of the multiple camera angles, tracking cameras etc, etc are those recorded by skyjake and which are included in the install :(

Share this post


Link to post

What you describe already exists with prboom+, provided you record whenever you are playing and then use -recordfromto and -skipsec to resume (this is a TAS method, obviously).

[Or record with any compatible exe, including doom2.exe, boom or mbf and then use prboom+ for the resumuing bit. Note that you can take any preexisting Doom2.exe or Boom demo and resume recording at any point during it using prboom+.]

So I guess you're making a feature request for this to be automated in some new (and optional) ubersaving system. I'd suggest that a couple of batch files would be adequate for the purpose though.

The non-rendering playback can take a while, but it is normally pretty quick unless it is a very long demo or a very monster-heavy wad, or you have MBF advanced monster AI enabled.

I'll emphasize that any demos recorded in this way are Tools-Assisted, and if you release them must be clearly labelled as such.

Share this post


Link to post

It would be good to have a time trial demo, a bit like in racing games where you race against the 'ghost' of the previous player.

EDIT: Apologies for getting off topic somewhat...

Share this post


Link to post
purist said:

It would be good to have a time trial demo, a bit like in racing games where you race against the 'ghost' of the previous player.



interesting idea, however, there's no monsters to get in your way in racing sims. since the monsters will attack you, watching the "ghost" will be like watching a desynced demo.

Share this post


Link to post
Torr Samaho said:

interesting idea, however, there's no monsters to get in your way in racing sims. since the monsters will attack you, watching the "ghost" will be like watching a desynced demo.


How about having ghost monsters too? :-D

Given equal starting RNGs, it would be a challenge to precisely keep up with the "ghost" (maybe by giving it a couple of seconds of look-ahead), by mimiking its every action as close as possible. If you stray, then the ghost will vanish and you'll be on your own, while as long as you keep precise enough, you'll follow it in its steps.

"RNG lockstep inferno", a new fun, challenging way to play doom ;-)

Share this post


Link to post
Torr Samaho said:

interesting idea, however, there's no monsters to get in your way in racing sims. since the monsters will attack you, watching the "ghost" will be like watching a desynced demo.


You'd be watching the doomguy "ghost" shooting shadows - no matter though, you would still have an idea of the previous player's progress. You wouldn't be watching a desynced demo you'd be playing in, competing against one.

Mario Kart didn't have monsters as such but I'm sure it had obstacles or somesuch hazards that could 'de-sync' from one trial to another.

Monster ghosts is an idea but could be distracting.

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  
×