--snapshot prints a byte-identical frame, and --state-snapshot prints the matching game state as JSON.
InputSeed 42, 80×24,
--ascii --no-colorNeedsPython 3.9+ and Git, no packages
Evidence
cmp exit 0, state JSON, Ran 128 tests ... OKPrerequisites
- Python 3.9 or newer.
- Git.
- A macOS or Linux shell, or Windows through WSL.
1. Clone the game
starfield.py. Nothing gets installed.
2. Render the same frame twice
Simulation with seed 42, advances it 2.2 s of game time in fixed 120 Hz steps, and prints one frame. cmp prints nothing and exits 0 when the files match. On 23 October 2026 at commit 3765e27 both files were 1,944 bytes and identical. The frame opens with the HUD line VANGUARD // ODYSSEY and shows WAVE 01 // HOSTILES INBOUND.
To render other staged screens, add --snapshot-screen boss, route, upgrade or systems, among others.
3. Read the state as JSON
Simulation.render_game_to_text in model.py. For seed 42 it reports "seed":42, "wave":1, "ship":"vanguard", two scout enemies with positions and hit points, and a target that is aligned and locked. To list the top-level keys:
coordinates, credits, enemies, jump_time, kills, mode, pickups, player, projectiles, remaining, route, route_choices, route_history, run_stats, score, screen, seed, services, ship, target, upgrade_choices, upgrades, wave, wave_total and weapons.
4. Run the test suite
unittest. A bare pytest fails at collection with ModuleNotFoundError: No module named 'terminal_starfield' because nothing puts the repo root on sys.path. On 23 October 2026 the run printed Ran 128 tests and OK in about 24 s. The tests cover the fixed-step clock, swept collisions, boss volleys, routes, refit services, ship loadouts, compact and ASCII layouts, input decoding, flight records and pseudo-terminal restoration.
5. Play it
Expected evidence
cmpexits 0 and the script printsidentical.- The frame contains only ASCII characters and no ANSI color codes.
--state-snapshotprints valid JSON with"seed":42.- The unittest run ends with
OK.
This recipe does not prove
- That a live run repeats. Keyboard input arrives at different simulation times, which changes later random draws.
- Frame rate or smoothness in any terminal emulator or browser.
- Anything about the browser build beyond what the shared Python code covers.
- That seed 42 reaches most of the game. It shows the first 2.2 s of wave 1.