LMP

From DoomWiki.org

Revision as of 01:22, 28 December 2007 by Ryan W (talk | contribs) (Somewhat rewritten to reduce redundancy with Demo, by separating technical content from gameplay descriptions)


An LMP is a lump that is usually referenced externally as a demo. The term LMP comes from the file extension that the original MS-DOS Doom engine used when recording gameplay demonstrations (see Demo), as file extensions under this operating system were strictly limited to three characters; LMP was the most natural shortening of "lump".

In the MS-DOS version of Doom, players could make a recording of their gameplay by typing

doom -record <demoname>

Viewing the demo is done by typing

doom -playdemo <demoname>

at the DOS console, where <demoname> was the name of the file to record the demo to. This was restricted (again, by the operating system) to eight characters. Doom would append the .LMP extension to the file, and regurgitate any attempt to record or play a demo with an alternate file extension, effectively setting the LMP extension in stone. Doom's built-in demos (see Demo) have exactly the same format.

An LMP file is a sequence of instructions which tells the game engine what actions the player will perform: when he will take a step forward, turn around, shoot, switch weapons, etc. It is interpreted by the engine as keyboard and mouse input, thereby allowing anyone to watch a recreation of the original recorded actions. While some elements of the game (such as damage done by attacks) are typically randomized, the usage of a pseudorandom number generator ensures they stay the same with every playback. Because the demo format is composed of a series of tic commands rather than a video of recorded gameplay, LMP files are relatively small and were very practical in their time. In the mid-1990s, when Doom was most popular, broadband internet connections were quite rare, and it would have been nearly impossible to distribute demos as video captures due to their large size.

Most modern source ports, such as ZDoom, cannot record demos in Doom's original LMP format, because their movement code requires the recording of extra data (such as Y-axis viewpoints and trajectories, jumping, or even flat heights and Thing dispositions as in a savegame) even if the associated features are not being utilised. Several ports, however, have painstakingly implemented compatibility options for vanilla demos (e.g. PrBoom, the Eternity Engine, and Chocolate Doom).

Over the years, a few utility programs have been written to convert LMPs between the original binary format and other formats. One such program is LMPC, which can also be used for hex editing of demos (see TAS).

External links