NIGHT GAME

Night Game

This is a text-mode baseball simulation. It plays one full game, pitch by pitch, with true player ratings hidden from the screens and the current MLB rules, and you manage one club from the bench.

The program is nightgame, and it takes these flags:

Without --headless, --survey, --season-survey, --cards, --export or --records, the game plays live on the radio screen, pitch by pitch, one line of the call every 1.5 seconds. The game goes no faster than its call, and waits while the call is paused. The call reads as a scorebook log, and the design notes list the codes. The screen needs a terminal of 80×24 or larger. The title row shows the inning and the count, as in “game 7 · Top 1st · 1-0”, so the game reads at a glance from another pane. The call stands in its own window, and beside it are two more:

On a small screen the windows give way in a set order: Matchup first, then Situation. All three fit at 80×24.

The keys are Ghost Boat’s, as in every game on Ghost OS, so a player who knows one knows the others. There are no vim keys: the arrow keys move, and letters are commands. The key bar at the foot shows the keys that work now; when they do not all fit, the least needed give way, and M lists every one. The keys:

The bench line takes these orders. A name is the player’s family name, and #27 names a player by uniform number when two share a name. The game refuses an order that does not stand, and says why in a sentence.

The bench line also takes the orders every game on Ghost OS shares, and a few of Night Game’s own. Each is answered on the hint line.

The bench line’s grammar, with tested examples, is docs/design/bench-grammar.md.

Options

The q menu’s third row opens the Options page, as in Dog Watch: one row for each setting, with its value, and beside it a few lines on what it does. The settings are the theme, the Nerd Font icons, the bell, the colour depth (24-bit or 256), speech, and the voice’s speed and pitch.

Each choice shows at once and is kept for later games, in the config folder ($XDG_CONFIG_HOME/nightgame/ or ~/.config/nightgame/), one small file for each: theme, nerd-fonts, bell, colours, speech, voice-speed and voice-pitch. These are the same files the flags and the keys keep, so they always agree. --bell, --theme and --speak are for one game and change no file. With speech on, the voice says the chosen row as it moves, as in “Voice pitch, minus 10. 7 of 7.” The screen-reader mode has no Options page: set the voice there with --voice-speed and --voice-pitch.

Your own log entries

log and your own words write a line of your own in the log, under the label MANAGER, where the call has got to: log Bunt them over. It shows on the call and in the whole log, and is never read out as part of the call. log with a number alone is not an entry: to log a number, add a word, as in log 3 up, 3 down.

Each entry is also kept in logbook.md in the data folder ($XDG_DATA_HOME/nightgame/ or ~/.local/share/nightgame/), plain Markdown that any editor reads. Each line is stamped with the date on your computer, the game and the inning, as in “2026-12-01 21:40 · game 7, CAL at MER · Top of the 3rd”. The file grows; nothing in it is ever rewritten.

Speech

Speech is off unless you ask for it: s turns it on and off, and --speak turns it on for one game. With it on, the computer’s own voice (spd-say on Linux, say on a Mac) says each line of the call as it is heard, with the outs and the score, each answer on the hint line, and what is chosen as the choice moves: the box score’s chosen row, the card open, and the chosen row of a menu, of the themes or of the Options page. It never reads the screen.

The screen-reader mode

--screen-reader draws no screen. A full screen redraws, and a screen reader would read every character, so this mode prints lines of text only, for your own screen reader to read: each line of the call as it is heard, and a plain prompt for orders, Order:. Every line you type there is read as the bench line reads it, so every order above works, and a pitching change waits for a line holding a capital B. These work as well:

Challenges, themes and documents

You make no challenges. The batter and the catcher challenge a ball-strike call by their own eye, and you watch.

The themes are Ghost OS’s shared palettes, the same looks under the same names in Ghost Boat, Dog Watch and Night Game. Night Game’s own, Under the Lights, comes first, then Ghost Boat’s house colours and the rest. They are built into the game; it no longer reads a themes file.

The colour reference, with every theme’s contrast figures and its look to players with colour-vision deficiencies, is docs/colour-reference.html. scripts/colour_reference.py generates it and docs/tokens.json from Ghost OS’s shared palettes.ron, read from the Ghost OS the build pins, so the reference cannot drift from the palettes the game wears; a test fails when either file is out of date.

An unknown option prints the usage line and exits with status 2. A data error exits with status 1.

The documents: the software design is docs/design/sdd.md (NG-SDD-001), the roadmap is docs/roadmap.md, the teaching notes are in docs/teaching/, and the mathematics behind the statistics, the pitch engine, the scorer and the random generator, with proofs, is in docs/math/. The design notes, with every survey and simplification, are docs/design-notes.md.

It is a sister project to Ghost Boat, and shares its workspace layout, its determinism rules and its British house spelling.