Skip to Content
GameGenTime travelReplay from the terminal

Replay from the terminal

Scripts/ue.mjs replay re-simulates a recorded run from tick 0 without a window. It is the command that Fork from here runs. You can use it by itself, without GameGen.

Before you start

  • Build the project: node Scripts/ue.mjs build.
  • Record a run. See Record a run.
  • Run the commands from the project folder.

Replay a run

Name the run by its folder name under Saved/Lou/runs, or by its path.

node Scripts/ue.mjs replay play-20261111-200501-1

With no other option, the replay uses the same inputs and writes the same frames.jsonl. It stops at the parent run’s last tick.

Change an input

node Scripts/ue.mjs replay play-20261111-200501-1 --flap-at 41 # flap on tick 41 as well node Scripts/ue.mjs replay play-20261111-200501-1 --no-flap-at 41 # drop the flap on tick 41 node Scripts/ue.mjs replay play-20261111-200501-1 --to 40 # recorded inputs up to tick 40, none after

An edited replay runs on to GameOver.

Options

OptionMeaning
--to NKeep the recorded inputs up to tick N, and none after it.
--flap-at NFlap on tick N whatever was recorded. You can repeat it.
--no-flap-at NDo not flap on tick N. You can repeat it.
--max-ticks NStop at tick N if the bird is still alive.
--child NAMEName the new run. The default is the run’s name, then -replay- and a counter.
--runs-root DIRWhere runs live. The default is Saved/Lou/runs.
--engine-root DIRThe engine to use. See Engine setup.

Ticks for --flap-at and --no-flap-at start at 1. A tick cannot be in both.

Read the output

The command prints one line of JSON with these fields:

FieldMeaning
childThe run that was written.
terminalHow it ended.
fork_tickThe tick where the replay forks from its parent.
terminal_tickThe last tick.
scoreThe final score.

The command never overwrites a run. The replay’s log is Saved/Automation/floppy-replay.log.

If the replay does not run

MessageFix
“error: no run … under …”Check the run name and --runs-root.
“error: the replay did not run (exit …). Build first (ue.mjs build); see …”Build the project, then read the log it names.

Next steps

Last updated on