Half-Life demo analysing
This is not directly a part of OpenDemo but it is demo-related.
Half-Life uses a demo format, that uses Quake1
DEM parts but also
totally newly invented structures. To learn more about this demo format
I started to write some simple Perl scripts to decode the demo files
of version 22.214.171.124. I have not looked at any other version of Half-Life.
All these script will become part of
LMPC in the future and can be fould
now on the
CVS tree of
project page on
is a tiny Perl script, which can anaylse a Half-Life
demo files and writes out a text file in the very good know LMPC
text files syntax.
The script can decode only very few basic messages but the overall structure
with the directory and the possibility to concatanate several demo files
is totally decoded.
The more difficult games messages (which use delta encoding and the like)
are described totally in a simple text file which comes with every Half-Life
To learn how to handle this type of text file, I wrote the Perl module
It is an object-oriented framework for reading parsing and writing delta files.
The Perl script
Delta.pm and converts
a delta file into an XML file with the same content but which is better
parseble by standard (XML) tools.
The Perl script
delta2lst uses again the Perl module
but reads in a delta file and writes out also a delta file. I used this tool
to verify my programming. So I found out, that the original file
delta.lst has 2 syntax errors but
it seams, that Half-Life can ignore (like
delta2lst too) these minor problems.
The next step is to use
in the main script
to decode the more interesting game messages.
Please try out my scripts and test them on many demo files.