DEMOLOOP

From Eternity Wiki
Jump to navigationJump to search

Eternity supports the DEMOLOOP lump, which is part of the id24 specifications.

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

  • "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. Each element is described below:
  • "type": can be 0 or 1. 0 means art screen, 1 means demo (game replay).
  • "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.
  • "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. 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.