Saved Game Information  6-15-2026  Release 5 © RTCM Greg Fox , Poda, -=CHE@TER=-, Corvin

Introduction | Saved Game File | Possible Usage | Tech Notes | Examples

Introduction

The .SAV file is one of the most powerful features and resources available with the game. Not only can you save a game in progress (anywhere in the game) you can also use it for archiving small mods and maps. In result you can actually add "features" to the game, expanding the capabilities of the SAVE and LOAD Game functions.

A Saved (.SAV) Game File

Upon saving a game to 1 of the 10 slots available, The compressed file will retain:

  • Current Map (saved current player position)
  • Cons (only changes)
  • Current Weapon
  • Current Items
  • Current Health
  • etc..

Its more or less the same as pausing your game, and returning to it, At the same exact location/settings you left off at.

Possible Usage

Presented here are many useful features you can use to enhance your games Save and load functions.

 

10 Favorite Maps:

You can "install" 10 maps/con sets permanently, be it reg. maps or user levels. This is useful for staying in the game and picking your levels at will. This procedure completely avoids the use of the setup front-end and any command line switches, and you don't have to exit the game.

 

100 Favorite Maps:

Modifying the User.con by replacing the names of the levels and then taking a snapshot ( a sav. game). Upon load you will be able to access 100 levels without exiting the game.

 

Map Recovery:

Any game you save. It also saves the current map. With this in mind you can in theory, extract the saved map. The area of the saved game, varies where the map location will be in the file. However, even though the map itself can be reformed as it does save the sectors, walls and sprites, it doesn't save the original starting spot, it moves it to the spot where it was saved.

So you probably can restore .MAP from the .SAV, but there is a chance that you can't restore original .MAP file (as it was before playing). So possible issues to be concerned about; What needs to be determined is in which condition is a Map in saved game files written. Example; You need to know if the .SAV game stores original .MAP or only modified version. For several examples, we know it doesn't store original player starting point but only your current position - you'll never be able to recover the Build mappers intend start position. How about if you travel on the lift (elevator) to a different floor - does the saved game retain all floors or just the floor your on. Does a "deleted" sprite from the sprite list become completely gone or just marked as invisible. (Is there any way to restore the original condition or not).

To answer these questions you need to dive in source code much deeper and compare saved game structures against .MAP file format. Here is the Duke code for the saving game routine: menues.c#L551. The loadplayer() function in menues.c shows the .MAP as boardfilename. You may need to compare it against .MAP file format and see what structures you need to read and what to skip (also you can take decompression code from the load game routine).

 

Instant Action Usage:

If your a mod or conversion creator, you can package a set of cons and a map into a single saved(.sav) file and title them Instant Action1 , 2, etc. These Instant Action Demo's can be a featured level with no exits or a single exit that would simple end the level and return the player to the menu. Such it would provide instant action under the control of the conversions creator.

You'll want to copy and modify one or or a few of your levels, offer a highlights of conversion. Once you have your map modified and ready to go. Enter the level and setup which weapon you want to first in hand. Which way you want the player facing and his location on the map. Save the game as Instant Action1.
To avoid accidental overwrite of the Interactive Demo by the player, I recommend you use the last (3)few slots. this way they will ensure they are saved with the proper filename. This way they will load up on the players game in the last few slots and still provide room for them to save games in progress.

 

Interactive Demo Usage:

This is pretty much the same as Instant Action usage above, BUT you distribute these before releasing your Conversion.

The map and cons will be "scrambled" and compressed a bit more than standard .zip programs. You also will only be handling a single file. this is a small alternative to releasing a Full Demo of your conversion or actual .demo movies.
However if your Interactive Demo requires .art or sound files, they must be present. They are NOT saved with a .sav game file.

 

Using with Standard/restored original CONs:

Upon loading a packaged saved game, the cons within the .sav file will be loaded. This allows you to use different cons per map, and saves you exiting the game and replace the cons manual with another effect you may want.

 

Using with DNSCOTTY:

The DNSCOTTY level warp cheat CAN be used to access another level with the maps located in the episodes. The CONs from the saved game will stay loaded.

Technical Notes about Saved Game Files

-There is no specific file format.

  • The data structures are just saved out on save, and then read back in on load.
  • They contain all the info needed to restart the game. (except sound and tiles).
  • There's no limit on the file size, however the components saved have upper size limitations.
  • Anything you change (player health, sprite info, etc) will show up when the game is loaded.

Examples

Try Greg Fox's 'DeathTrap' package in the 'Duke3D Map' download page.

Some text editted from his web site about SAVED Games:

GAMESAVES!

I noticed something cool about Duke, so I'll share it:

Whilst using a User Level, if you save the game to a standard slot, it also saves the whole level.

This means you can install about ten different favorite levels.

If they have artwork or sound then you need these present (they're not saved), but if it's a straight-forward MAP file then you could distribute the SAV file instead - they sometimes compress a little better.

Also, when you do a gamesave, you also store the contents of your CON files, or at least a lot of the attributes contained therein. I'll say this:

If you set up your game for MIGHTY foot (for an example) and then do a gamesave (either a user-map or one from the game), then next time you start DUKE (with standard/restored CONs), as soon as you load the gamesave file, the foot is boosted automatically.

This saves altering (USER.)CON files each time you want a particular effect. It also means you can have a library of your favorites.

Finally, you can use DNSCOTTY during the game to access another level within the standard game, and the LOADed CON will still work.

Try it!!!!