Airtime docs Play ▸

Replays

Words#

  • Replay: Airtime's own recording. The inputs of a run, played back through the same simulation. Exact.
  • Demo: an Urban Terror recording (.dm_68, .urtdemo). Server snapshots about 50 ms apart. It can be watched and drawn as a ghost, but not re-simulated exactly.

A replay is not a video and not a list of positions: it is everything the player did, fed back into the same simulation. Played back on the same map with the same rules and the same game build, it reproduces the run bit for bit: the movement, the movers, the enemies and every shot, the player's and the enemies'. The Airtime server uses the same input stream online.

The format#

FieldWhy
magic, format versionthe file type
game build + physics versionreplays are only exact on the same physics
map id + content hashthe right map, the right version (map.md)
rule set (stamina mode, walljumps, gravity, frame time, random seed, … and the map's moves)which board it belongs to
player id and name, date, client infowho, when
result: route (or the valid routes), run type (pro, practice, stage), time, splits, finished or notthe summary, readable without simulating
flags: practice tools used, stylewhat the run may count for

Body#

  • The input stream: every command (8 ms: view angles, buttons, movement keys, weapon), plus every other input: spawn, save / load position, ready, firing and weapon changes, stamina refills, practice rewinds, gravity changes, rule changes. Compressed: delta-encoded angles and times, grouped unchanged buttons, then a general compressor (e.g. zstd). Raw, a 10-minute run would be about 1.9 MB (125 commands per second); most of it repeats, and compressed it is a small fraction of that.
  • Keyframes: every few seconds (e.g. 5 s), the full simulation state (player state, timers, movers, enemies, rng). Used for seeking and for checking; playback still starts from inputs. The server can rebuild them.
  • Events: timer start / checkpoint / stop with exact times, so splits can be read without simulating.

Splits (the timetable)#

Replays carry everything the speedrun timetable needs (gameplay/runs.md):

  • Split events with names: each checkpoint passed, its id and name, the split time and the segment time, with the exact (sub-command) time from the timing clock.
  • Unfinished runs too: a run that was reset still holds its finished segments. That's where most gold (best) segments come from, and how the attempt counter works.
  • The history per route: every attempt (finished or not) with its segments, so personal best, best segments, sum of best, averages and the latest run can all be compared.
  • Recomputable: since the inputs are stored, splits can be computed later for split points that didn't exist when the run was played (custom splits, a checkpoint added to the map, as long as the collision didn't change).
  • Export: splits and history to LiveSplit's format, and a live event stream (start, split, reset, in-game time) for runners who connect LiveSplit.

Range#

  • A whole session (everything since you joined) vs. a run (start to stop). Sessions are stored locally, runs are cut out for boards, and the cut starts with a keyframe so it plays on its own.

Uses#

UseHow
Ghostsimulate the inputs once in the background, keep the positions, draw them. Classic UrT demos become ghosts the same way, from their snapshots.
Watch / spectatefull HUD (speed, keys, strafe HUD), pause, seek via keyframes, slow motion.
Verificationthe server simulates the run with the map of that hash and the rule set. Only if the stop event and time match does it count.
Analysisspeed over distance, split deltas, jumpstats, where you lost time vs another replay.
Sharinga replay link opens the map with that ghost. Small files (compressed inputs).
Trainingstart a practice run from any point of a ghost (take its position and speed).

Verification#

  1. The client uploads the replay after a finish (or the online server already has the inputs).
  2. The server checks the header: known build, map hash exists, rule set allowed on that board.
  3. It simulates the run with the same simulation core as the game. Fast: a minute of run takes milliseconds.
  4. It compares the end time and splits with the claimed result. Any difference = rejected.
  5. Plausibility checks (for review only): input timing, angle changes per frame. This flags, it never auto-bans.

Physics updates: a replay with an older physics version is played with that version (the simulation is kept per version), or its board is frozen. Old runs are never re-scored with new physics.

Privacy and size#

  • Replays contain only game inputs. No chat, no other players (except co-op, where both inputs are part of the run).
  • The server keeps the best N runs per player and route, plus all records. Local history on the player's machine, with a size limit.