DMO formatDuke Nukem 3D or Redneck Rampage.
Original by Uwe Girlich
To create a DMO file start the game with the command line switch
In Duke Nukem 3D 1.0 and 1.1 the skill value is a bit strange:
To record a skill n (1<=n<=4) game note to use
Multiplayer recordings have always the skill 0. Cooperative recordings won't play back properly.
It is impossible to record with version 1.0 more than one level. You can't even record the summary screen at the end of each level.
In version 1.1 it seems to be possible (I got it some times). Some other times I got only the recording of the last level.
A DMO file records all player actions. The monster movements, re-spawn positions etc. are totally deterministic. The messages during a multiplayer game (macros and RemoteRedicule (tm)) do not appear in the DMO.
A DMO file consists of a header with some organizational information and the data area with all the (compressed) game tics.
The term ``game tic'' comes originally from DOOM and denotes the smallest unit of time during the game. The duration of a game tic is 1/30s. To store a game tic in a file means to store all actions, like movement, open doors, fire weapons and so on, happened during this time.
2.1 old Duke Nukem 3D Header
Duke Nukem 3D 1.0 and 1.1 use a 9 byte main header:
The first entry in the header (number of game tics) may be zero in version 1.1 recordings. This should mean, that there is more than one level recorded.
2.2 new Duke Nukem 3D Header
Duke Nukem 3D 1.3D uses a 24 byte main header:
2.3 Redneck Rampage Header
Redneck Rampage uses a 543 byte main header:
The episode (better: volume) number is one of the
The players name is a `\0' terminated string. The maximum number of characters for the name is 512.
The data starts in byte
Each block consists of a header with some organizational information and the compressed data.
A block header is:
The compressed data starts in byte
3.2 Compression technique
Duke Nukem 3D uses a modified Lempel-Ziv algorithm (similar to the
In fact Steffen Winterfeldt changed the original
The compression algorithm used in Redneck Rampage seems to be similar but I
did not get
3.3 Macro block
Some blocks of data form a macro block. This has to do with both decompression and game tic difference storing. The first game tic in a macro block is the original game tic. All the following game tics are only the byte-per-byte difference game tics to its specific predecessors. There is no special code to signalize the end of a macro block. It is simply the number 2520/(player number) game tics, which makes a macro block. Note that 2520 is divisible by 1,2, ... ,8 without remainder. Only the last macro block may contain less game tics if the file ends before.
3.4 Data description
One game tic corresponds to 10 times player number bytes:
Go x and y
The 2 words (
To calculate the absolute value of his speed just calculate sqrt(x2+y2).
A standard speed is 1280 (with running 2560). The coordinate system used is like this:
The turn word contains 2 bytes (
There are many ``use'' actions in Duke Nukem 3D. You can do all at once,
because there is a single bit for each action. The appropriate bit is 1 as long
as you press the corresponding key.