🎮 Game Dev Origin
MOTH — You Cannot Steer
You are a moth, and you cannot steer. Light is the only thing you obey. You play the world instead — placing, snuffing, and relighting lanterns to route your helpless moth through dark gardens to the moon-gate.
Overview
MOTH is a puzzle game where you never touch the moth. The moth is always pulled toward light — inverse-square weighted across every lit source in the scene — so it drifts wherever the brightness leads. Instead, you play the world: you place, snuff, and relight a limited pouch of lanterns to route your helpless moth through dark gardens to the moon-gate. The twist is that hazards are mostly also lights — a candle-flame kills, but it attracts exactly like your lanterns — so every level is a tug-of-war you choreograph. Finishing means going dark: snuff everything so the faint moon can finally take the moth home.
How it works
There are no controls for the moth, only for its environment. You reason about a force field, not a character. Light sources sum with inverse-square falloff into a single pull, and you edit that field one lantern-tap at a time to steer indirectly. Orbiting behavior — moths circling a lamp — isn’t scripted; it falls straight out of the physics.
Architecture
flowchart LR
SRC["Light sources<br/>lanterns + hazard flames"]
FIELD["Attraction field<br/>Σ inverse-square pull"]
MOTH["Moth drifts<br/>no direct control"]
PLAYER["You tap<br/>place · snuff · relight"]
GATE{"Reached<br/>moon-gate?"}
WIN["Go dark →<br/>moon carries it home"]
SRC --> FIELD --> MOTH --> GATE
GATE -- no --> PLAYER --> SRC
GATE -- yes --> WIN
What makes it interesting
- Indirect control — you never move the moth; you edit the light field it obeys. The whole game is that aha.
- Emergent orbiting — moths circle lamps because the inverse-square physics makes them, not because anything told them to.
- Hazards that tempt — a killing flame attracts just like a safe lantern, so danger and solution share the same rule.
- Going dark to win — the finish condition inverts the whole game: snuff every light so the moon can take over.
Highlights
- Vanilla JS ES modules — no build, no CDN, no dependencies, canvas + WebAudio only
- Inverse-square light-summation model that produces emergent orbiting for free
- Indirect-control puzzle design — you choreograph a force field, tap by tap