Co-op robustness, audio/a11y, new towers and enemies, Uplink rebalance
Co-op (QA'd with two to three real browsers, TCP-proxy chaos scenarios): - partner's tower changes are never dropped after a render stall or snapshot burst - half-open connections show "reconnecting" in ~6 s instead of 45-65 s - upgrade and next-wave are idempotent (stale commands refused), restart message, promoted host gets Play again, failed joins never kill a live game, listener leaks Audio / keyboard / a11y: - one Audio element per track, fade/stinger supersede tokens, play() retry on the next gesture, 5 s fallback to the synth, mute works everywhere, dialogs with role/aria-modal/focus handling, accessible names for sound/speed/pause New content: - enemies: Daemon (healer), Proxy (regenerating shield), Botnet (flyer swarm); waves weave them in from wave 9 (waves 1-8 unchanged) - towers: Sandbox (stun pulse), Load Balancer (fire-rate aura); hotkeys 1-9 - glyphs/shapes, stun/heal effects, gallery e2e that pixel-checks every kind Orbital Uplink rebalanced after playtesting (was affordable by wave ~6 and buyable in bulk from boss rewards): 1500 credits, upgrades 1200/2000/3200, and every Uplink already owned makes the next one 25% dearer to buy AND to upgrade (each tower remembers its multiplier, carried in the tower list as a 9th field). Shared TD.priceFor/upgradePrice so the UI shows exactly what the sim charges. Also: tablet/foldable viewports in the layout matrix (tolerant colour check), docs (README tower/enemy tables, PROTOCOL shield/stun/pm encodings, NEXT roadmap). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tb8pW2KAN4oFkh1aK1BfD8
This commit is contained in:
parent
962189419a
commit
28502984ec
29 changed files with 3370 additions and 230 deletions
|
|
@ -20,6 +20,10 @@ module.exports = async function ({ browser, url: URL, out: OUT }) {
|
|||
await until(() => A.page.evaluate(() => NW.app.ctrl.kind === 'remote' && NW.app.ctrl.status === 'joined'), 5000, 'host joined');
|
||||
const room = await A.page.evaluate(() => NW.app.ctrl.room);
|
||||
assert(/^[A-Z0-9]{4}$/.test(room), 'room code ' + room);
|
||||
// a first-time player gets the help whether they start solo or join co-op (code-26); it is not shown again once seen
|
||||
assert(await A.page.evaluate(() => !document.getElementById('help').hidden), 'the first-run help is shown to a new co-op host');
|
||||
await A.page.click('#btnHelpClose');
|
||||
assert(await A.page.evaluate(() => document.getElementById('help').hidden && NW.app.inGame && !NW.app.ctrl.view.paused), 'closing it returns to the game');
|
||||
|
||||
// guest opens the invite link
|
||||
await B.page.goto(URL + '?room=' + room); await sleep(300);
|
||||
|
|
@ -27,6 +31,8 @@ module.exports = async function ({ browser, url: URL, out: OUT }) {
|
|||
await B.page.fill('#inName', 'Bob');
|
||||
await B.page.tap('#btnJoin');
|
||||
await until(() => B.page.evaluate(() => NW.app.ctrl.kind === 'remote' && NW.app.ctrl.status === 'joined'), 5000, 'guest joined');
|
||||
assert(await B.page.evaluate(() => !document.getElementById('help').hidden), 'and to an invited guest');
|
||||
await B.page.tap('#btnHelpClose');
|
||||
await until(() => A.page.evaluate(() => NW.app.ctrl.players.length === 2), 3000, 'host sees 2 players');
|
||||
const slots = await Promise.all([A, B].map(p => p.page.evaluate(() => NW.app.ctrl.you.slot)));
|
||||
assert(slots[0] === 0 && slots[1] === 1, 'slots 0 and 1: ' + slots);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue