towerdef/public/assets/music
Claude 28502984ec 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
2026-10-10 21:18:43 +00:00
..
battle.mp3 Upload files to "public/assets/music" 2026-10-09 19:48:56 +00:00
boss.mp3 Upload files to "public/assets/music" 2026-10-09 19:48:56 +00:00
lose.mp3 Upload files to "public/assets/music" 2026-10-09 19:34:29 +00:00
menu.mp3 Upload files to "public/assets/music" 2026-10-09 19:49:37 +00:00
README.md Co-op robustness, audio/a11y, new towers and enemies, Uplink rebalance 2026-10-10 21:18:43 +00:00
tracks.json Add co-op server, deploy docs, e2e suite and wire in the music tracks 2026-10-09 19:57:27 +00:00
win.mp3 Upload files to "public/assets/music" 2026-10-09 19:34:29 +00:00

Music

Netwall plays a built-in synth melody. To use your own tracks (for example from Suno), put the files in this folder and name them in tracks.json:

{ "theme": "menu.mp3", "battle": "battle.mp3", "boss": "boss.mp3", "win": "win.mp3", "lose": "lose.mp3" }
  • theme: main menu. battle: in game (loops). boss: plays while a Rootkit boss is on the board (loops).
  • win / lose: short one-shot stingers on the end screens.
  • Formats: mp3, ogg, m4a or wav. Anything left null keeps the synth version.
  • Loops are played with the browser's loop flag, so crop the track to a whole number of bars for a clean seam.
  • Keep files small (a few MB) so phones start playing quickly.
  • A track that is not playing 5 s after it was asked for (slow connection, missing or broken file) is replaced by the synth melody for that moment and tried again the next time it is wanted. win and lose are fetched in the background once the first battle track plays, boss a wave or two before the first boss wave (Data Saver and 2G/3G skip that).
  • Browsers that refuse to start audio without a tap (iOS / iPadOS Safari, Chrome on Android) get the music at the first tap. The volume of an audio element is read-only on iOS, so the fades there are instant and the music plays at full file volume: master the files accordingly.

Suno prompts

Style: instrumental, cyberpunk synthwave, dark ambient electronica, driving arpeggiated synth, pulsing sub bass, 110 bpm, A minor, tense but hypnotic, digital glitch percussion, retro sci-fi, seamless loop, no vocals

Exclude: vocals, rap, acoustic guitar, orchestral, fade out, long intro, spoken word

Lyrics box: [Instrumental]

Track Style tweak
theme slow 80 bpm, atmospheric pads, minimal, curious, wide reverb
battle the prompt above, plus [Loop-friendly: steady energy, no big breakdown]
boss 140 bpm, aggressive, distorted bass, heavy industrial, urgent, pounding kick
win short victory fanfare, 8 seconds
lose short descending glitch, system failure, 6 seconds

Words that fit the game: data stream, packet traffic, firewall, mainframe, server room, neon grid, circuit board, binary, handshake, encrypted, modem blips, bitcrushed snares, FM bells, filtered saw lead, sidechained pads.