DEMOLOOP: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
Eternity supports the DEMOLOOP lump, which is part of the id24 specifications.
Eternity supports the DEMOLOOP lump, which is part of the id24 specifications. This lump lets you define the startup sequence, when the game typically shows you various screens and game demos (replays) in sequence, repeating in a loop. Previously you would need to replace various lumps (like TITLEPIC and credits for the art screens, or the DEMOx lumps, possibly emptying them to remove demos) or set EDF [[gameproperties]], but the DEMOLOOP lump gives you complete control over this sequence.


DEMOLOOP must contain a JSON text data. The content of DEMOLOOP must be of the form:
DEMOLOOP must contain a JSON text data. The content of DEMOLOOP must be of the form:
Line 34: Line 34:
*"version": must be "1.0.0" maximum.
*"version": must be "1.0.0" maximum.
*"metadata": required id24 information. Eternity does not consume them, but they should be provided.
*"metadata": required id24 information. Eternity does not consume them, but they should be provided.
*"data": must contain a single "entries" array of one or more elements. Each element is described below:
*"data": must contain a single "entries" array of one or more elements (the example above shows two entries). Each element is described below:
:*"type": can be 0 or 1. 0 means art screen, 1 means demo (game replay).
:*"type": can be 0 or 1. 0 means art screen, 1 means demo (game replay). Caution: demos will only replay reliably in Eternity if the they are recorded in MBF-compatible or below (Boom or vanilla Doom) ports. Do not rely on Eternity-recorded demos to stay in sync with any Eternity update.
:*"primarylump": if "type" is 0 (art screen), this is the name of the graphics lump to display as the art screen. Eternity tolerates a missing "primarylump", in which case it will show the credits screen, but this is nonstandard and not portable. If "type" is 1 (demo), this is the name of the demo lump, and it's required.
:*"primarylump": if "type" is 0 (art screen), this is the name of the graphics lump to display as the art screen. If "type" is 1 (demo), this is the name of the demo lump, and it's required.
:*"outrowipe": can be 0 or 1. 0 means no screen wipe effect (e.g. melt) will occur after the end of the current stage. 1 means to apply the wipe effect.
:*"outrowipe": can be 0 or 1. 0 means no screen wipe effect (e.g. melt) will occur after the end of the current stage. 1 means to apply the wipe effect.
:*"secondarylump": only applies if "type" is 0 (art screen). This is optional and will be the lump name of the music to play during the display of the art screen. Eternity allows omitting the game-specific prefix such as "D_" on Doom. The name is case insensitive. Demos don't use this option because the levels they replay have their own music.
:*"secondarylump": only applies if "type" is 0 (art screen). This is optional and will be the lump name of the music to play during the display of the art screen. Eternity allows omitting the game-specific prefix such as "D_" on Doom; for example both "runnin" and "D_RUNNIN" are valid for Doom 2. The name is case insensitive. Completely omitting "secondarylump" will just keep playing the music from the previous stage. Demos don't use this option because the levels they replay have their own music.
:*"duration": only applies when "type" is 0 (art screen). This is time in seconds that the art screen will display before going to the next stage. It can be expressed in decimal quantities.
:*"duration": only applies when "type" is 0 (art screen). This is time in seconds that the art screen will display before going to the next stage. It can be expressed in decimal quantities. It should be set for every entry of "type" 0.

Latest revision as of 09:07, 14 June 2026

Eternity supports the DEMOLOOP lump, which is part of the id24 specifications. This lump lets you define the startup sequence, when the game typically shows you various screens and game demos (replays) in sequence, repeating in a loop. Previously you would need to replace various lumps (like TITLEPIC and credits for the art screens, or the DEMOx lumps, possibly emptying them to remove demos) or set EDF gameproperties, but the DEMOLOOP lump gives you complete control over this sequence.

DEMOLOOP must contain a JSON text data. The content of DEMOLOOP must be of the form:

{
    "type":    "demoloop",
    "version": "1.0.0",
    "metadata": {
        "author":      "...",
        "timestamp":   "...",
        "application": "...
    },

    "data": {
        "entries": [
            {
                "type":          0,
                "primarylump":   "IMAGE1",
                "secondarylump": "MUSIC1",
                "duration":      5.5,
                "outrowipe":     1
            },
            {
                "type":       1,
                "primarylump: "DEMO5",
                "outrowipe":  0
            }
        ]
    }
}

Explanation of fields[edit]

  • "type": must be "demoloop".
  • "version": must be "1.0.0" maximum.
  • "metadata": required id24 information. Eternity does not consume them, but they should be provided.
  • "data": must contain a single "entries" array of one or more elements (the example above shows two entries). Each element is described below:
  • "type": can be 0 or 1. 0 means art screen, 1 means demo (game replay). Caution: demos will only replay reliably in Eternity if the they are recorded in MBF-compatible or below (Boom or vanilla Doom) ports. Do not rely on Eternity-recorded demos to stay in sync with any Eternity update.
  • "primarylump": if "type" is 0 (art screen), this is the name of the graphics lump to display as the art screen. If "type" is 1 (demo), this is the name of the demo lump, and it's required.
  • "outrowipe": can be 0 or 1. 0 means no screen wipe effect (e.g. melt) will occur after the end of the current stage. 1 means to apply the wipe effect.
  • "secondarylump": only applies if "type" is 0 (art screen). This is optional and will be the lump name of the music to play during the display of the art screen. Eternity allows omitting the game-specific prefix such as "D_" on Doom; for example both "runnin" and "D_RUNNIN" are valid for Doom 2. The name is case insensitive. Completely omitting "secondarylump" will just keep playing the music from the previous stage. Demos don't use this option because the levels they replay have their own music.
  • "duration": only applies when "type" is 0 (art screen). This is time in seconds that the art screen will display before going to the next stage. It can be expressed in decimal quantities. It should be set for every entry of "type" 0.