Skip to content

typing-game-cli

typing-game-cli pitches itself as a way to “practice your typing speed by competing against typer-robot or against your best result.” It races the operator’s live typing against a synthetic opponent and shows who’s ahead in real time. Feature set:

  • Race against an AI opponent at selectable difficulty — low, medium, fast, extra-fast — i.e. the robot types at a fixed characters-per-minute rate and you try to out-pace it.
  • Race against your personal best (the ghost is your own prior run).
  • Handicap mode — the opponent spots you a character-count advantage, so an evenly-matched race is tunable.
  • CPM + WPM results, with goal-setting (specify a target WPM), topic/author selection for sentence variety, and a sortable/filterable results history with top-N displays.

The mechanically interesting part is the robot-as-pace-setter: a deterministic synthetic competitor whose progress is rendered alongside yours, turning a solitary typing drill into a race. That’s the transferable idea.

A KN-86 typing cart is a natural fit for the deck’s identity — it’s a terminal, typing is the primary interaction, and the Ferris Sweep’s unusual function-block layout means there’s real skill (and onboarding value) in drilling it. A cart would:

  • Display WPM + accuracy live, drawn on the 128×73 cart-usable rows with the cell API (cell-print, ADR-0027).
  • Render single-color progress bars for operator-vs-opponent — two horizontal bars (cross-link blessed-contrib.md gauge/bar idiom), the operator’s filling from typed characters, the opponent’s filling at the robot’s fixed rate.
  • Optionally pair with the Typeinc (draw-keyboard) widget for next-key highlighting during the drill — a typing cart is the canonical caller for that widget.
  • Use the deck’s amber palette throughout; the “race” reads as two amber bars closing on a finish column.

This is not v0.1 — it’s a cart concept worth parking. But it’s a strong one: it teaches the Sweep layout through play, which is exactly the onboarding problem the function-block legend creates.

2. The racing-opponent pattern as a generic “ghost competitor” mechanic

Section titled “2. The racing-opponent pattern as a generic “ghost competitor” mechanic”

The reusable idea is bigger than typing. typing-game-cli’s robot is a ghost competitor: a deterministic synthetic agent whose progress is rendered against the operator’s, with selectable pace and a handicap knob. That pattern generalizes to any KN-86 game cart with a progress dimension:

  • A decryption/ICE-breaking cart where a rival netrunner races you to crack the same node — the rival’s progress bar advances at a fixed (or seed-driven) rate; beat it or get locked out.
  • A mission timer reframed as a competitor: instead of a bare countdown, a ghost agent “completing the contract” at the deadline rate, giving the timer a face.
  • A personal-best ghost — the operator’s own prior run replayed as the opponent, the same way typing-game-cli races your best result. This composes with Universal Deck State (the prior-run trace lives in the per-cart save).

The ghost’s pace can be LFSR-seeded (KN-86’s procgen substrate) so a given seed always produces the same opponent — deterministic, replayable, fair. That ties the mechanic to the seed-capture gameplay loop (cross-link cbonsai.md, which makes the seed→determinism argument for ambient generation; the same determinism makes ghost competitors reproducible).

The race renders as two stacked progress bars in amber on black — operator on top, ghost below — each a run of filled cells ( or half-block) advancing toward a finish column, with a thin amber rule marking the goal. Lead/trail is read by which bar is longer, not by color. The just-passed / just-fell-behind moment can flash the leading bar’s head cell brighter for one frame (cross-link ascii-effects.md brighten). No second hue needed — position and length carry the entire race state.

  • License: not surfaced in the fetched README; treat as concept/pattern reference, not code to vendor. The ghost-competitor mechanic is a design idea, independently implementable.
  • The ghost-competitor pattern is the durable takeaway, more than the typing cart itself. It’s a generic “synthetic rival with a progress bar and a seed-driven pace” primitive that fits decryption races, timed contracts, and personal-best replays.
  • Cross-link Typeinc — the keyboard-widget sibling; a typing cart is the canonical caller for (draw-keyboard).
  • Cross-link cbonsai.md — the seed→determinism argument that makes a ghost’s pace reproducible.
  • Cross-link blessed-contrib.md — the progress-bar / gauge rendering idiom the race bars borrow.
  • Cross-link game-programming-patterns.md — the ghost is an Update-Method entity ticked each frame at a fixed rate; modeling it as such is the clean implementation.