Invaders Too
The formation never stopped coming, so this time you went up after them. ← → to move, Z / Space to fire — and hold it: the original's one-bolt law is repealed, the gun streams on a cooldown. But read the fine print before you celebrate: the sky counts your shots, and every few kills something new joins the dive. This one can be won. She's up there.
What makes it Invaders Too
The original's four mechanics traded in for four of its own, each labelled in the source above:
- The ladder — the whole difficulty curve is a printed table (
CONFIG.escalation): at 8 kills the weavers join, at 20 the spitters, at 35 the divers, at 55 the snipers — each arrival announced across the screen, each tier raising the tempo. At 75, the ladder runs out and the Mothership comes down herself. The escalation isn't scripted drama; it's data you can read, and change. - The repeal, priced — no more one bolt in the air. The gun runs on a nine-tick cooldown instead… and every 28 rounds fired, the spawn cadence tightens by two ticks. Permanently. A marksman fights the printed table; a sprayer fights his own trigger finger.
- The stream — no marching grid this time: enemies arrive continuously down eight lanes, and each school descends its own way — the drone drifts, the weaver owns a swaying column, the spitter poisons its lane with bombs, the diver hangs a beat then commits, the sniper takes a deck up top and fires aimed.
- The end — the Mothership has 26 bolts' worth of hull, wears her health on it, and answers everything with an aimed three-way fan. Bring her down and the game is won — with the accuracy ledger printed on your victory card.
The engine lesson
Like the original, this uses no World, no rooms — the machine layer à la carte. But it adds a split worth stealing: waves.js is the whole game with no screen attached — ship, stream, ladder, boss, both endings — and main.js only owns pixels and keys. The sim runs headless in Node, which is how the campaign is proven winnable by a robot before it ever meets a player. And note the starfield: nothing is stored, nothing is random — every star's position is a pure function of the tick.
Determinism, as ever
There is no Math.random() anywhere in the SOURCE panel. Spawn lanes walk a stride through counters, weaves come off the tick, each enemy's character is hashed from where it was born. Same inputs, same invasion, every time.
Download & remix
Both files are live in the SOURCE panel above — edit and RUN ▶. Take them home: main.js and waves.js plus the single-file engine bundle. Remix ideas: reprint the escalation table (a six-tier sprint? a twelve-tier marathon?); make the pressure forgiving instead — misses only; a second Mothership who learned from the first.