From 0404e0a17127cfdd7d077542cfcb8152a90a4f04 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 3 Feb 2026 17:42:08 +0000 Subject: [PATCH 1/3] Fix doc staleness that survived the main rewrite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most of the earlier documentation audit was already incorporated into main's rewritten history. This keeps only the corrections main still needs: - docs/server-architecture.md: wipe phase timings 60/60/120 → 45/45/45 ticks (1.5s each, per WIPE_TIMING in shared/types.ts) and countdown "3...2...1" → 1s (COUNTDOWN_SECONDS = 1) - Lessons_learned.md: lives are per-player (Player.lives is the canonical counter), not a shared pool https://claude.ai/code/session_01F9DNv5dEh5MZPrziuqmkWv --- Lessons_learned.md | 2 +- docs/server-architecture.md | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Lessons_learned.md b/Lessons_learned.md index ceac01e..3633f34 100644 --- a/Lessons_learned.md +++ b/Lessons_learned.md @@ -405,7 +405,7 @@ const scaleTable = { } ``` -**Shared lives in co-op.** 5 lives shared across all players in co-op (vs 3 in solo). Any player death costs one shared life. +**Per-player lives in co-op.** Each player gets 5 lives in co-op (vs 3 in solo). `Player.lives` is the canonical counter — the game ends when all players are individually dead and out of lives. **Spread spawn positions.** Players start evenly distributed across the screen width: diff --git a/docs/server-architecture.md b/docs/server-architecture.md index 951d884..d726126 100644 --- a/docs/server-architecture.md +++ b/docs/server-architecture.md @@ -133,23 +133,23 @@ Created (POST /room) │ waiting │ ◄────────────────► │ countdown │ └─────────┘ all ready └───────────┘ │ │ - │ start_solo │ 3...2...1... + │ start_solo │ 1s countdown │ │ ▼ ▼ ┌───────────┐ ┌───────────┐ │ wipe_hold │ ◄───────────────┤ wipe_hold │ └─────┬─────┘ └───────────┘ - │ hold complete (60 ticks) + │ hold complete (45 ticks) ▼ ┌──────────────┐ │ wipe_reveal │ aliens created with entering=true └──────┬───────┘ - │ reveal complete (120 ticks) + │ reveal complete (45 ticks) ▼ ┌─────────┐ wave complete ┌───────────┐ │ playing │ ──────────────────► │ wipe_exit │ └─────────┘ └─────┬─────┘ - │ │ exit complete (60 ticks) + │ │ exit complete (45 ticks) │ ▼ │ ┌───────────┐ │ │ wipe_hold │ ─── (loops back to wipe_reveal) @@ -506,9 +506,9 @@ TICK │ playing │ playing/game_over Wave transitions use a three-phase wipe animation controlled server-side: ``` -wipe_exit (60 ticks / 2s) → iris closing animation -wipe_hold (60 ticks / 2s) → black screen with wave title -wipe_reveal (120 ticks / 4s) → iris opening, aliens enter with entering=true +wipe_exit (45 ticks / 1.5s) → iris closing animation +wipe_hold (45 ticks / 1.5s) → black screen with wave title +wipe_reveal (45 ticks / 1.5s) → iris opening, aliens enter with entering=true ``` During wipe phases, the `wipeTickReducer` counts down `wipeTicksRemaining` and From bca859d167525766859580282e8708c8b2ba953f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 10 Jun 2026 08:48:35 +0000 Subject: [PATCH 2/3] Fix help text: A/D keys are not implemented, only arrow keys The --help output claimed 'Arrow keys or A/D' for movement, but normalizeKey() in client/src/input.ts only maps arrow keys to movement. Matches README and CLAUDE.md, which document arrows only. https://claude.ai/code/session_01F9DNv5dEh5MZPrziuqmkWv --- bin/vaders.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/vaders.ts b/bin/vaders.ts index e5e9da9..15a1bc4 100755 --- a/bin/vaders.ts +++ b/bin/vaders.ts @@ -35,7 +35,7 @@ Usage: vaders --local Run local server (default: remote) Controls: - Arrow keys or A/D Move left/right + Arrow keys Move left/right SPACE Shoot ENTER Ready up / Select Q Quit From da3c0c3a3d5dad999217f08149777765245e5e67 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 10 Jun 2026 08:55:45 +0000 Subject: [PATCH 3/3] Fix doc inconsistencies: per-player lives, 4p grid size, version badge - Lives are per-player in co-op (5 each), not a shared pool: GameRoom.ts assigns player.lives = 5 per player and the reducer decrements only the hit player's counter. Changed '5 shared' to '5 each' in README, CLAUDE.md, and server-architecture.md. - 4-player alien grid is 13x6 (scaling.ts), not 15x6. - README version badge bumped to 1.1.1 to match package.json and CHANGELOG. specs/vaders-spec.md and CHANGELOG.md left untouched as historical documents. https://claude.ai/code/session_01F9DNv5dEh5MZPrziuqmkWv --- CLAUDE.md | 6 +++--- README.md | 4 ++-- docs/server-architecture.md | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index add8b34..61efc97 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -131,9 +131,9 @@ grep -r 'opentui' web/src/ # Should find nothing | Players | Lives | Alien Speed | Grid | |---------|-------|-------------|------| | 1 (solo) | 3 | 1.0× | 11×5 | -| 2 | 5 shared | 1.25× | 11×5 | -| 3 | 5 shared | 1.5× | 13×5 | -| 4 | 5 shared | 1.75× | 15×6 | +| 2 | 5 each | 1.25× | 11×5 | +| 3 | 5 each | 1.5× | 13×5 | +| 4 | 5 each | 1.75× | 13×6 | ### WebSocket Protocol diff --git a/README.md b/README.md index aaa9da5..14a5d82 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Multiplayer Space Invaders clone (1–4 players) built with OpenTUI and Cloudflare Durable Objects. **Play in your terminal or your browser** — one authoritative server, two frontends, same game. -![Version: 1.1.0](https://img.shields.io/badge/version-1.1.0-blue) +![Version: 1.1.1](https://img.shields.io/badge/version-1.1.1-blue) ![Terminal Size: 120x36](https://img.shields.io/badge/terminal-120x36-blue) ![License: MIT](https://img.shields.io/badge/license-MIT-green) @@ -61,7 +61,7 @@ TUI and browser players can share the same room. The server is authoritative at ## Game modes - **Solo** — 3 lives, standard alien grid -- **Co-op** (2–4 players) — 5 shared lives, larger grid, faster aliens, per-player slot colours +- **Co-op** (2–4 players) — 5 lives each, larger grid, faster aliens, per-player slot colours ## Architecture diff --git a/docs/server-architecture.md b/docs/server-architecture.md index d726126..cf58617 100644 --- a/docs/server-architecture.md +++ b/docs/server-architecture.md @@ -566,9 +566,9 @@ Game difficulty scales with the number of players: | Players | Lives | Alien Speed | Grid Size | Alien Shots/s | |---------|-------|-------------|-----------|---------------| | 1 (solo) | 3 | 1.0x | 11x5 | 0.5 | -| 2 | 5 shared | 1.25x | 11x5 | 0.75 | -| 3 | 5 shared | 1.5x | 13x5 | 1.0 | -| 4 | 5 shared | 1.75x | 15x6 | 1.25 | +| 2 | 5 each | 1.25x | 11x5 | 0.75 | +| 3 | 5 each | 1.5x | 13x5 | 1.0 | +| 4 | 5 each | 1.75x | 13x6 | 1.25 | ### Player Spawn Positions