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/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/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/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 diff --git a/docs/server-architecture.md b/docs/server-architecture.md index 951d884..cf58617 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 @@ -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