Versus mode: attack vs defend (sim, bots, server, client)
One player defends, the other plays the Internet: earns credits over time and spends them on packets, upgrades and sabotage. Two rounds with swapped roles, timed (the faster fall wins). Built end to end, NOT yet QA'd or balanced. Sim (public/js/sim.js, TD.VS table): attacker economy (income, lifetime bonus, leak payback), spawn / stage / launch convoys, 7 tech tracks, abilities (EMP, decoy, surge, DDoS), defender tools (scan, patch, repair, quarantine), role-checked commands, round result, role-private state. Co-op/solo unchanged (24 scripted games replay identically). Bots (public/js/bot.js, tools/versus.js): defender (maze + turrets) and attacker (budgeted spender reading the tower mix); headless bot-vs-bot runner. Server (server/versus.js, protocol doc): versus rooms with lobby / countdown / playing / roundover / matchover, role stamping, cross-role refusal, role-private priv messages at 4 Hz, computer seat, freeze/forfeit rules, no pause/speed. Client (public/js/versus.js): setup dialog (role, length, vs computer or online), countdown, defender tools row, attacker unit shop with convoy + launch, tech and abilities, gateway choice, round/match screens, sounds, phone-first dock rows. Status and next steps (balance: the attacker currently wins ~100% of bot rounds; QA with two browsers; layout matrix rerun) are in docs/NEXT.md and docs/VERSUS.md. The full planned workflow incl. balance/QA prompts is in docs/workflows/versus-full.js. 253 unit tests pass; one smoke e2e run; no other e2e per the user's request. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tb8pW2KAN4oFkh1aK1BfD8
This commit is contained in:
parent
b4ae6cb57d
commit
2098d59c1f
23 changed files with 6166 additions and 90 deletions
13
README.md
13
README.md
|
|
@ -176,6 +176,19 @@ the trailing slash). A dedicated sub-domain is simpler.
|
|||
| **Credits** | From kills and cleared waves. Upgrade turrets (3 levels, 4 for the Uplink); selling returns 70% (walls 100%). |
|
||||
| **Difficulty** | **Easy / Normal / Hard**, picked in the menu (solo) or by the host when creating a co-op room, and shown next to the next-wave list and on the end screen. It scales the starting credits and integrity, the hit points of every packet and what a kill pays (the table is `DIFFICULTIES` in `public/js/sim.js`). Normal uses the base tables of the game with every multiplier at 1. Your best wave is kept per map **and** difficulty. |
|
||||
|
||||
### Versus: play the Internet (new, lightly tested)
|
||||
|
||||
One player **defends** (builds the maze and turrets as usual), the other **attacks**: you earn credits over time and spend them
|
||||
on packets, upgrades and sabotage. A match is two rounds with the roles swapped; the round ends when the server falls or the
|
||||
timer runs out, and the faster fall wins the match.
|
||||
|
||||
* **Attacker:** a unit shop (every packet type), buy now or **stage** a convoy and **launch** it all at once, pick the gateway,
|
||||
seven tech upgrades (armor, speed, health, regeneration, shield, stealth, encryption), and abilities (EMP a turret, decoy,
|
||||
surge, DDoS). Units that survive longer pay you a lifetime bonus; a leak pays back its price.
|
||||
* **Defender:** the normal build palette plus counter-tools: Scan, Patch, Repair, Quarantine.
|
||||
* Play **against the computer** (no server needed) or in an online room with a friend; a computer can also fill the empty seat of a room.
|
||||
* Status: built end to end but **not yet balanced or QA'd**: the attacker has the edge for now. See `docs/VERSUS.md` and `docs/NEXT.md`.
|
||||
|
||||
Controls, desktop: click to build, drag to paint walls, right-click cancels, `1`-`9` pick a tower, `Space` next wave,
|
||||
`U` upgrade, `X` sell, `T` change targeting, `P` pause, `F` speed, `A` auto-waves, `M` mute, wheel zoom, Alt+click pings.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue