← back to Wild Orbs

README.md

43 lines

# WILD ORBS

Single-file HTML5 canvas arcade shooter. Asteroids' skeleton, but every orb breaks
a different rule when you shoot it. No assets, no CDNs, no build step — open
`index.html` in any modern browser.

## Controls
`WASD` / arrows fly · `S`/`↓` brake · `SPACE` fire (hold) · `P` pause · `M` mute

## The twelve orbs
| Orb | On hit |
|---|---|
| SPLITTER | cracks into smaller, faster splitters (3 size tiers) |
| HIVE | bursts into 5 homing swarmlings that hunt the ship |
| WELL | collapses into a gravity well that bends and eats your shots |
| PHASE | 3 hp — blinks to a new position every time you clip it |
| SINGULARITY | opens a black hole that devours orbs, bullets and you, then implodes |
| INVERTER | reverses your controls for 6 seconds |
| SHATTER | explodes into 8 shards that ricochet off the walls |
| STASIS | drops a bubble where everything but you moves at 30% speed |
| CHAIN BOMB | detonates and sets off every orb in range — cascades |
| MIRROR | clones itself point-mirrored across the screen (2 generations) |
| RUBBER | 4 hp — bounces off walls instead of wrapping, faster each hit |
| NOVA | erupts in a shockwave that damages everything it sweeps through |

Types unlock two per wave over the first six waves.

## Systems
Inertial ship with screen wrap, fire cooldown and recoil · toroidal (wrap-aware)
distance for homing, gravity and collisions · force fields applied per entity
(bullets pulled harder than the ship) · localized time dilation from stasis
bubbles · pre-rendered radial-gradient glow sprites drawn additively · motion-trail
frame fade · trauma-based screen shake with rotation · combo multiplier, extra life
every 5,000, localStorage high score · WebAudio: per-orb-type synthesized hit
sounds, gated thrust noise, and a bassline whose tempo climbs with the wave.

## Verify
`node --check` on the extracted script, plus a Playwright suite that starts the
game from the keyboard, exercises every orb type's on-hit behaviour, runs the
field effects through a full lifecycle, walks the death → game-over → restart →
pause paths, resizes mid-game and soaks for 20s. Zero console errors; 73fps under
load in a real browser.