Version Independent Doom Demo (VIDD) System
 
Version 1.1
 
Copyright © 2002
Lucas Pope
 
INTRO
 
The VIDD system intends to do the following things relative to Doom ".lmp" demos:
  • remove the syncing problems during playback associated with current and future Doom ports
  • allow demos to be more self-sufficient packages for easier distribution and viewing
  • support random access to any point in a demo during playback

 
TECHNOLOGY
 

VIDD employs a general keyframe system to record the absolute position and properties of all the objects in a Doom world every frame. Using this system allows perfect playback of the events that took place during the recording in an application-independent way. Because it is a general format with a supplied API, it is possible to incorporate demo playback into ports of Doom that have absolutely no code-level relation to the original Doom.

Since they contain absolute information for an entire Doom demo, VIDDs are roughly 20 times larger than their corresponding .lmp would be. This is after employing strict size optimizations and tight compression. Although it may sound like a lot coming from the .lmp world (where a typical demo is under 100K), VIDDs are comparable in size to Quake demos (in the megabyte neighborhood).


 
INSTALLATION
 

Install the latest PrBoom distribution (2.2.3 available at prboom.sourceforge.net) and get it working properly. In the prboom.cfg file, make sure default_compatibility_level is set to -1 and demo_insurance is set to 2.

Since this is an initial release of the VIDD system, you can unzip it into the same directory and it will overwrite both prboom.exe and glboom.exe with VIDD-enabled versions of the 2.2.3 source tree. It will also update the SDL libraries to compatible versions. I realize this isn't exactly a polished install process, but it'll have to do for now.



USAGE
 

VIDD recording and playback is currently only supported with an extended version of the Win32 PrBoom source port of Doom (prboom.sourceforge.net). This means that .lmp demos that do not play back properly in this port will currently not be convertable to VIDDs. PrBoom is a very true doom port, but unfortunately it does not play back Plutonia and Evilution demos properly in all cases. If anyone has any source-level knowledge of why this is so, please contact me.

To play a VIDD:

This part is easy. Either drag and drop the .vidd file onto the VIDD-supporting port of PrBoom (or associate .vidd files with prboom.exe so they can be double-clicked), or type:
prboom -viddplay demo.vidd

Where "demo.vidd" is the filename of the VIDD you want to play. The VIDD system will automatically load all required wads, and will notify you if any of these wads are not available.

Pressing the up or down arrow keys during playback will bring up the VIDD Playback Menu. From here you can adjust a number of parameters with the arrow keys.

To record a VIDD:

This part is harder.

The VIDD recording system is designed only to convert .lmp demos to .vidd files. This means you must first record the demo in the traditional manner with doom or doom2 using the -record command line parameter. Once you have a working .lmp, you can then convert that to a VIDD.

In addition, the VIDD format contains some information not found in the original lmp. Most notably, it includes the filenames of the custom wads required to play the demo back, the names of those who recorded the demo, the date it was recorded, annotations within the demo, and more. These extra properties are set in an XML file that is fed to the VIDD system during conversion. Once this XML file has been properly created, you can either drag and drop it onto prboom.exe or process it like so:

prboom -viddrecord demo.xml

 
PARAMETER FILE FORMAT
 

Since there are more parameters to generating a VIDD file than will practically fit on the command line, the VIDD system reads these parameters from a standard-syntax XML file. The best way to describe the file format is with an example.

demo.xml:
<vidd
name="demo.vidd" compress="gzip"
iwad="doom.wad" pwad1="mm2.wad"
>
<lmp file="demo.lmp" style="tyson">
<runner>Lucas Pope</runner>
<event>Big Day In</event>
</lmp>

<annotation segment="0" time="0">
A litte bit of text to describe the demo, normally found
in a separate text file packaged with the lmp.
</annotation>

</vidd>

 

First, we start with the main "vidd" block, which has a few important attributes:

<vidd
name="demo.vidd" compress="gzip"
iwad="doom.wad" pwad1="mm2.wad"
>
namethe name of the VIDD file you want to generate
compressthe type of compression you want to use on the VIDD segments (levels). Valid values for compress are "none", "gzip", or "bzip". If compress is not specified, it defaults to "none". "bzip" always generates the smallest files, but is a very slow compression algorithm (although decompression is fast) and can take a very long time to finish. "gzip" is a good middle-ground between compression speed and size.
iwadthe original game wad used to record the demo. The value of iwad is used to determine which game the demo was recorded with.
pwad1, pwad2, ... pwad10these are optional and can be used to specify any custom wads that are required to play the demo.

 

Next, we have to specify which lmps will be converted, and any number of optional name/value pairs that describe the recorded missions:

<lmp file="demo.lmp" style="tyson">
<runner>Lucas Pope</runner>
<event>Big Day In</event>
</lmp>
filethe filename of the lmp to convert.
runner, event, style, etc...these are all optional attributes that are simply displayed on the screen as the demo plays back. You can create your own attribute names with whatever values you want or you can ommit them completely and have only the file attribute specified.
 
As long as the .lmp files were all recorded with the same iwad and pwads, you can have multiple <lmp> blocks within the main <vidd> element.
 

Optionally, you can add "annotations" that will appear onscreen as the demo is being viewed.

<annotation segment="0" time="0">
A litte bit of text to describe the demo, normally found
in a separate text file packaged with the lmp.
</annotation>
segmentthe level (starting from "0") where you want the annotation to appear. Note that lmps can contain multiple-level recordings, so annotations are tied to the entire VIDD, not individual lmps. For instance, if you want to convert two lmps, one that spans 3 levels, and one that spans 2, you can display an annotation on the 1st level of the second lmp by referencing segment "3".
timethe number of seconds into the level when the annotation should appear. A value of "0" makes it appear immediately at the start. A value beyond the level completion time will cause the annotation to be ignored.

 

Finally, you must close the "vidd" block:

</vidd>



RELEASE HISTORY
 
1.1: August 5, 2002
  • Updated to use the latest version of PrBoom (2.2.3)
  • Source code included
  • Allow any iwad specification
  • VIDD menu pauses demo playback when active
  • Arrow keys ignored in HGWells Mode (must press ESC to exit mode)
  • Generalized all element types and properties. Now adding new properties or element types no longer requires changes to the ViddSys library
  • Added drag and drop support for recording
  • VIDD menu default control shows current segment
  • Fixed a small bug in XML reading that prevented attributes and elements from being interchangable
  • Redirected stdout to vidd.log to facilitate progress monitoring (paving the way for a form-based frontend for VIDD recording)
1.01: June 21, 2002
  • Added ANNOT control to the VIDD menu to skip annotations
  • Changed seconds display to include the colon
1.0: June 19, 2002
  • Initial release
  • This release does not contain source code, which is forthcoming. Anyone interested in getting the source code immediately can email me for it.



KNOWN BUGS
 
  • Lost Souls are sometimes frozen in their last death frame during playback



FUTURE PLANS
 
  • Either merge with the PrBoom source-tree or diverge into a separate package (requiring an overwrite of prboom.exe and glboom.exe doesn't cut it)
  • Make the ViddSys library platform-independent to support systems other than Win32
  • Fix PrBoom so it plays Final Doom demos properly