Weapons & controls
Game state
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
choicerequest 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.mjspins 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.