Invaders from Beyond
Fifty-four of them. One of you. ← → to move, Z / Space to fire — and you have one bolt in the air at a time, so every miss is a small sentence served. They march, they drop, they get faster as they get fewer. They only need to reach the ground once.
What makes it Space Invaders
Four mechanics, each labelled in the source above:
- The march — the formation moves as one body: step, step, step, edge, drop a row, reverse. The step arithmetic is a pure exported function (
marchStep), and the cadence follows the living count (cadenceFor): a full grid ambles, the last two sprint. The mounting panic is arithmetic, nothing more. - One shot — the cannon owns a single
Projectile. Fire is refused while it flies. This one rule is most of the game's tension. - The bunkers — destructible cover built from the engine's CRUMBLE tiles: both sides' shots chew them via nothing more than
map.weaken(cx, cy, 4). No destruction system was written; the tilemap already knew how to fall apart. - The descent — reach the cannon's row once, and it's over. Waves start one row lower and a little angrier.
The engine lesson
This game uses no World, no rooms, no exits — just the loop, the video, the input, one TileMap and Projectiles. The engine is à la carte: a fixed screen and a marching grid need only the machine layer. Even the cannon is the ordinary Player — a top-down profile welded to its rail by one line.
Build your own invasion
There IS a dedicated engine mode for this: the Game Designer's World view → "Shmup — waves attack" — your start room becomes the arena and every other room's enemies fly in as a wave formation, with an animated entry-pattern picker (march, sine, zigzag, swoop, dive) right in the Room panel. No code: paint rooms, pick patterns, press Play. (This page's game is built the other way — à la carte, no World at all — to show the machine layer underneath.)
Download & remix
The whole game is one file, live in the SOURCE panel above — edit and RUN ▶. Take it home: main.js plus the single-file engine bundle, and it runs anywhere. Remix ideas: the UFO that crosses the top for mystery points; a second cannon; invaders that shoot back along columns like they used to.