User:Monster Iestyn/Demo

From SRB2 Wiki
Jump to: navigation, search
Test.png This article or section is incomplete. It doesn't have all of the necessary core information on this topic. Please help the SRB2 Wiki by finishing this article.

Demos, also known as replays, are a type of file format that store recordings of a player's input and position data for a particular level. These are used for various specific areas in SRB2: the replays in Record Attack and NiGHTS Mode, the title screen demos, and the Metal Sonic race in Egg Rock Zone Act 3.

Format

Header

Position Length (bytes) Description
0x00 12 Demo header string (0xF0SRB2Replay0x0F)
0x0C 1 SRB2 version; for v2.1, this is 201
0x0D 1 SRB2 sub-version; for v2.1.14, this is 14
0x0E 2 Demo format version (latest version: 9)
0x10 16 Demo checksum
0x20 4 Demo type string:
  • "PLAY" - Player replay
  • "METL" - Metal Sonic replay

Player replay data

Position Length (bytes) Description
0x24 2 The map number of the level the demo was recorded in
0x26 16 The MD5 for the map
0x36 1 Demo flags

Recording/Playback

Command line parameters

  • -record
  • -playdemo
  • -timedemo
  • -maxdemo

Console commands/variables

Record Attack/NiGHTS Mode

Main article: Record Attack

Console commands/variables

Title Screen demos

Metal Sonic replays