Nova Strike build notes: faking a GPU with a 2D canvas
Cabinet four is live: Nova Strike, an arcade space shooter â endless waves, bosses every fifth wave, power-ups, and a combo chain that rewards greed. It's also our most graphically ambitious game so far, and it still ships as one HTML file with no engine, no WebGL and no image assets. Here's how.
The whole look is one blend mode
Everything that glows in Nova Strike â plasma bolts, engine flames, explosions, shield rings â goes through a single trick: globalCompositeOperation = 'lighter'. In that mode overlapping colors add instead of covering each other, which is exactly how light behaves. Two particles crossing get brighter; a dense explosion blooms toward white on its own. You stop drawing shapes and start drawing light, and the "GPU shader" look falls out of a 2D canvas for free.
Never build a gradient per frame
The naive way to draw a glow is a radial gradient per particle per frame â and at three hundred particles that melts a phone. Instead we render each glow color once into a small offscreen canvas at startup and stamp it with drawImage scaled to size. Stamping a cached sprite is one of the fastest things a canvas can do, which is why the game keeps 60fps on mid-range phones while a boss fight fills the screen.
Autofire is a design decision, not a shortcut
Your cannons in Nova Strike never stop firing. That's not laziness â it's the same call we made when Sky Runner grew a fire button and half our testers never found it. On a phone there is no comfortable "hold to shoot": a thumb that fires can't also dodge. Making fire automatic turns the whole game into the part that's actually fun â flying. Position becomes your trigger, and the skill ceiling moves into the combo chain: kills within two seconds of each other stack a multiplier up to Ã5, so where you fly decides how fast things die.
Screen shake has rules
Juice sells every hit, but shake done wrong reads as jank. Ours follows three rules: it only moves the world (the HUD and overlays never shake), it decays linearly over a few frames instead of oscillating, and its size is proportional to the event â a dart popping nudges 5 pixels, losing your ship slams 16. Add a one-frame white flash on the big moments and every explosion lands with weight.
Sound effects with zero audio files
There are no .mp3s in Nova Strike. Every sound is synthesized live with the Web Audio API: laser shots are a square wave chirping down from 840Hz, explosions are filtered white noise over a sine thump, power-ups are a three-note triangle arpeggio. Total cost: about sixty lines of code and zero bytes of download. The mute button remembers your choice, and audio only starts after you tap Play â the browser (rightly) demands a gesture first.
Difficulty that streams, not dumps
Waves aren't spawned all at once; a small queue streams enemies in over several seconds â a V of darts here, a pair of weavers off the flanks two seconds later. The queue budget grows with the wave number, a gentle global speed ramp tops out at wave 30, and every fifth wave a Dreadnought arrives with a health bar and its own bullet patterns. Endless, but it never feels random.
Fly the first wave â and if you crack a Ã5 chain on a boss, we want to hear about it.