byo.games

Replays

A replay is a text file: a seed plus an input timeline. Because the console is deterministic, replaying it reproduces the exact game — which makes a replay simultaneously a regression test, a proof of completion, and a watchable recording.

Format

game: my-game
seed: 0
goal: reach the end
-- timeline: "<frame> <buttons…>", held until the next line
0 right
40 right a
120 -
  • Frames are absolute and ascending. Buttons: up down left right a b x y l r start select. - = nothing held.
  • The listed state is held until the next line changes it.
  • Two-player lines put pad 2 after a pipe: 12 right a | left. A line without | leaves pad 2's held state unchanged.
  • Mouse: an m:x,y,buttons token (held until the next m: token): 30 a m:384,216,1. Text typed on exactly that frame: t:<hex utf-8>.
  • goal: names the game.toml goal this replay claims to complete.

Verification

byo verify replays/win.rpl --game mycart

re-simulates the replay; the declared goal must fire (byo.complete) before the timeline ends (+60 frames of grace), and the game must pass the snapshot test (save, simulate garbage, restore — the future must be bit-identical). A game is publishable only while at least one bundled replay verifies. The site re-runs this on its own servers for every published version.

Recording

  • Headless: write timelines by hand or by bot — iterate byo sim --input taps.rpl --assert "dump_state()" until the log shows the goal, then save the input as the replay.
  • The browser watch pages replay any bundled .rpl — inputs drive both pads, keyboard off.