Case study
Starwake
Wormhole racing with Rocket League feel: boost pads, supersonic, demolitions and team dogfights. Plays in the browser with a keyboard and mouse or a controller.
- Three.js
- WebGL 2
- Web Audio
- ES modules
- WebSockets






The idea
Flying through space dodging asteroids, plasmoids and alien drones should feel epic. The first prototype raced through rings in open space and was too hard to follow, so the track became a wormhole: a glowing tube that snakes past planets and stations. Its wall keeps you on course without stopping you, so all of your attention goes on the racing.
Rocket League physics, pod-racer speed
• Boost pads: small ones down the safe middle line, three big ones a lap out by the wall, so the risky line pays • Supersonic at full boosted speed, with a sonic trail and a louder engine • Demolitions: hit a rival head-on while supersonic and they respawn behind; slower hits are bumps • Dodge: a sideways barrel roll that also knocks away incoming lasers • Near misses with rocks and rivals top up your boost • Streaks, radial blur, FOV kick, engine shake and Doppler pass-bys sell the speed
Two modes and a hostile galaxy
Races are won by crossing the line first, against AI pilots or other players. Battle is a free-roam deathmatch around a derelict station, as a free-for-all or Blue versus Red. Both can carry hazards: drifting plasmoids that burn on contact, and the Vesk, an alien drone faction that ambushes everyone. Asteroids, cargo pods and satellites break into tumbling chunks and drop boost, missiles or shield repairs.
Reasons to race again
• Ghosts: your best run on each course races alongside you as a hologram, with a live ahead/behind time • Medals: bronze, silver and gold targets on every track, plus a secret fourth tier • Pilot rank: XP from every race unlocks parts, paint finishes and boost trail styles • Replays: a slow-motion finish-line replay, and highlights of demolitions and photo finishes • Daily run: a new wormhole generated from the date, the same for everyone • Music that builds with your speed, lifts on the last lap and opens up when you go supersonic
Easy to pick up
The ship turns toward the mouse reticle. Track assist eases you down the tunnel when you let go, aim assist locks missiles on rivals in range, and flight assist steers round rocks. Each assist runs from Off to Strong, so new pilots can enjoy the scenery and experienced ones can turn everything off. The pace was deliberately slowed to feel cinematic rather than twitchy.
How it's built
Plain ES modules and a vendored Three.js r187, with no bundler. The game ships no textures, models or sound files: the sky, planets, asteroids, craft, engine audio and nine-layer adaptive soundtrack are all generated in code. Physics run at a fixed 120 Hz. Every course and arena is built from its id with a seeded random generator, so every client agrees on object ids without syncing them, and the daily run is generated and validated the same way from the date. Medal times are derived from each course's length, obstacles and bends, so generated courses get fair targets too. AI pilots use the same controls as a player. Headless tests race every preset on every course, check 60 future daily runs, check that hands-off and flailing pilots still finish, run bot battles, round-trip ghosts and exercise the network code before a release.
Multiplayer
Players host or join a lobby with a four-letter code, or send an invite link that joins the room directly. Each player simulates their own ship and sends compact snapshots 20 times a second, and remote ships are drawn 110 ms in the past with interpolation. Online play goes through a small WebSocket relay with origin checks, rate limits and keepalive, ready to host on Render. On this site, multiplayer currently runs between Starwake tabs in the same browser.