Superb Invaders — Systems & Drops


Core loop

  • Step timing: Aliens move in discrete “steps” at an interval that shortens over time and after each kill. When a wall would be hit, the swarm reverses direction and drops down a row.
  • Player ship: Left/Right move with bounds clamping; Space fires up to 3 concurrent bullets.
  • Collisions: Simple AABB checks resolve bullet↔alien and drop↔player interactions.

Presentation

  • Background: Gradient sky, parallax/twinkling stars, and a vignette; camera shake on explosions; overlay shows “GAME OVER” / “YOU WIN.”
  • HUD: Score at top‑left; heart icons (lives) at top‑right.

Drops & reactions

  • Scared state: Invaders near an incoming bullet set a short “scaredTimer” and emit sweat‑like particles.
  • Random drops: Timed spawns fall with gravity and friction; drop types include visual and physical variations (e.g., helmets that bounce and pile). Player collisions cost a life unless invincibility is active.
  • Helmet mechanic: In “small mode” (when few invaders remain) aliens have multiple lives; specific hits knock off helmets which fall with physics, while the alien persists until its lives reach zero.

Difficulty ramp

  • Global ramp decreases the move interval periodically (and on kills), accelerating the swarm. Small‑mode further increases tension by adding alien durability.

Audio

  • 8‑bit style SFX (square/triangle waves + quick envelopes) for shots, steps, explosions, drops (whoosh/clink/crunch), and hits.

Reset & flow

  • Clicking after win/lose resets all state: player position, bullets, particles, drops, move interval, score, lives, and flags.

Ideas to extend

  • Shields, bombers, column targeting bonuses, combo scoring, timed challenges, or per‑row behaviors (zig‑zag or sine glide). Add formations or boss phases once small‑mode activates.