GridWars — geometry that decides, out loud

A twin-stick arena in the GridWars lineage: neon geometry hunts you across a spring grid that warps under every explosion. Every enemy runs a labelled rule ladder — chase, wander, charge, brake, flee, jink, trail, split — and the game state panel counts each tag, so "what the enemies decided" is a number, not a vibe. Waves are seeded and deterministic, and the one genuine choice — which geometry enters next — goes to the engine when it is available. Mouse to aim, left click to fire, right click to swap weapons, WASD to fly.

engine: off
Difficulty & waves

Tiers unlock geometry: diamonds and pinwheels at tier 1, squares and rockets at tier 2, snakes at tier 3, weavers and wells at tier 4. Score and survival time both buy tier — the thresholds shift with difficulty. A wave block is 15 s; the spawn interval tightens every wave and with score.

Ship

Thrust and drift, not a cursor: you keep sliding after you let go. More inertia is a longer slide.

Weapons
1 · pulse — fast single shot
2 · scatter — 3-way spread
3 · laser — piercing beam
4 · wave — expanding ring

These are live: retune mid-run and the seed stays, so the run stays comparable. Right click or 1–4 swaps.

Grid

The grid is a real spring mesh in the core: every death and every bomb pushes it, and it settles back. Zero warp is a flat grid that still takes the hits.

Spawn

Rate scales the interval; the cap is a hard ceiling on the field, splitting children included.

no decisions yet

Weapons & controls

Game state
what the enemies decided
engine decisions

Enemy decisions are cheap local rules, counted per tag. The engine gets exactly one kind of question — which geometry enters next — and only when two or more tier-valid answers exist. Absent engine, the seeded weighting answers and the rung says rule.

What decides what

  • Every enemy decides out loud. Five times a second — and again on every phase change — each geometry reads its own situation (a bullet on its line, your distance, its own charge) and picks a tag: chase, wander, charge, brake, aim, flee, jink, trail, pull, burst. The panel counts every pick.
  • The personalities are the clone's. Diamonds jink off your fire line, pinwheels barely bother, squares flee and split into three, rockets charge a straight line and brake, snakes eat your trail and only die at the head, wells swallow fire until they burst.
  • Waves are seeded, and the engine names the entrant. Same seed, same spawn sequence. Which geometry leads a wave — and which newly-unlocked geometry enters first — is the one genuine choice, so that is what leaves the tab as a real choice request when the WASM engine is available.
  • Determinism is test-pinned. The core is DOM-free: the same seed and the same inputs replay the same match, particles included. tests/gridwars_test.mjs pins the spawn sequence, the ladder, the splits, and the bomb.

Honest edges

  • There is no AI in the enemies and no network anywhere on this page. The ladder is a dozen comparisons per enemy; the engine is one local WASM call per wave at most. The rung chip says which one answered.
  • When the engine is unavailable, nothing pretends: the seeded roster weighting picks, and the state panel shows engine: unavailable.
  • The multiplier is geoms, not time: fly through what the dead drop. Dying resets it. Bombs score nothing and drop no geoms — clearing the field is a rescue, not a farm.
  • The scoreboard is session-only — close the tab and it is gone. Nothing is stored or sent.