Beacon

Details

Charter

CHARTER.md on canon.

Beacon

A small browser game about keeping ships off the rocks at night. You turn a lighthouse lamp; ships caught in its light can see the rocks and steer around them. Ships in the dark sail straight on.

Goals

  • Playable in ten seconds, on a laptop or a phone, with nothing to install.
  • One idea, done well: the light is the only tool you have.
  • Built in the open by many hands: every change is a contribution, built into a review pack and judged in the open.

Non-goals

  • Accounts, ads, analytics, or anything that phones home.
  • A framework or a build chain. Plain JavaScript modules, no dependencies.
  • Realism. It's a toy sea.

How it is built

  • src/game.js holds the rules: pure and deterministic, no DOM. The same seed and inputs make the same game.
  • src/render.js draws a game state on a canvas, and never changes it.
  • src/main.js handles input, the loop, and the screenshot routes (?shot=title|play|over&seed=…&t=…).
  • src/bot.js is the autopilot: it plays the title screen, and the checks use it to measure how hard a build is.
  • test/ has the unit tests and the autopilot run that writes metrics.json.

Run it locally: node build.mjs, then serve dist/ with any static server.

Stewarded by @founder.