Public: anyone can read this; the crew can change it.

Migrated from github.com/amirmushichge/pixel-plays

Add Lighthouse: sweep the beam to turn boats away from the rocks #33

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

I merged main into the Lighthouse branch and pushed it. The Lighthouse, Orchard, serve and shell tests pass. I didn't run the rest of the suite, and scripts/fast.ts isn't in this repo.

Notes

shipped production is serving it deploy ab54f53

opened this

I merged main into the Lighthouse branch and pushed it. The Lighthouse, Orchard, serve and shell tests pass. I didn't run the rest of the suite, and scripts/fast.ts isn't in this repo.

  • Conflicts: main added Orchard in the same places this branch added Lighthouse (README.md, index.html, shell.js). I kept both games, with Orchard first and Lighthouse after it.
  • README "Add a game" sentence: the list of games that play on their own sound effects now reads "Row Home, Orchard and Lighthouse".
  • Merge workaround: a plain git merge failed because .bash_profile, .bashrc and other dotfiles under .claude/ are tracked in this branch. Here they show as modified, and git couldn't stash them. I marked them skip-worktree locally so the merge could run. That is a local index setting and isn't in the pushed commit.
  • Dotfiles still tracked: they were committed into this branch by mistake, in c869978. I left them as they are. Removing them from the branch is a separate change.

Continues #33

2 earlier comments · 1 event
commented

Lighthouse is added at /lighthouse/: a rocky islet and striped tower on white, with night water drawn only inside the ragged diorama edge. The new tests, serve.test.mjs and shell.test.mjs pass. I never saw it run in a browser. I ran the page script against stub DOM objects, which booted cleanly. I viewed one frame of the bake, which showed the dark water inside the ragged edge and the dithered beam. I didn't watch gameplay, the HUD, drag, keys or sound.

What changed

  • Rules are in lighthouse/beam.js, plain data in and out. It covers spawning at the edge of the water, drifting in with a slight swirl, and a 30° beam. A boat held in the beam for 1 s turns away and scores 1, and a boat reaching the rocks costs a life. Spawn rate and boat speed both rise over the 90 s night, and three lost boats end it early. Dwell drains at twice the fill rate when a boat slips out of the light.
  • Tests in lighthouse/beam.test.mjs (12) cover a lit boat turning away, an unlit boat still coming, a boat reaching the rocks, the beam edge and the ±π seam, three lives, 90 s dawn, ramping difficulty, steering and best kept across nights.
  • Page lighthouse/index.html follows the Paper Route pattern: 360x280 canvas, fixed 30° camera, and #mute. The HUD shows boats saved, lives, best and time left.
  • Look: the beam lights the water in dithered bands, and lit boats cast their shadow straight away from the tower. A boat's sail brightens as its dwell fills. The islet grass stops swaying under prefers-reduced-motion.
  • Controls: drag the beam toward the pointer, or hold ←/→ or A/D. A tap, space or Enter starts and restarts the night. The aria-label says how to play, and the rules popup is four lines.
  • Listings: GAMES in shell.js, the static list in index.html and the README Games table all carry Lighthouse, appended at the end so a rebase on main stays easy. The README "no music" list names it too. serve.test.mjs asserts /lighthouse/ and beam.js answer 200. No .mp3 is committed.

Not done:

  • No water ripples, because the README Visual rules allow ambient motion only in plants.
  • No dependencies.
  • I couldn't run bun scripts/design-lint.ts because the file isn't in this clone. bun x tsc --noEmit printed only its usage text, since there is no tsconfig.
  • Best score is kept in localStorage like Kite Hill; there is no server state.

To try it: bun serve.mjs, open /lighthouse/, then drag or press ← →.

🤖 Generated with Claude Code

commented

I merged main into the Lighthouse branch and pushed it. The Lighthouse, Orchard, serve and shell tests pass. I didn't run the rest of the suite, and scripts/fast.ts isn't in this repo.

  • Conflicts: main added Orchard in the same places this branch added Lighthouse (README.md, index.html, shell.js). I kept both games, with Orchard first and Lighthouse after it.
  • README "Add a game" sentence: the list of games that play on their own sound effects now reads "Row Home, Orchard and Lighthouse".
  • Merge workaround: a plain git merge failed because .bash_profile, .bashrc and other dotfiles under .claude/ are tracked in this branch. Here they show as modified, and git couldn't stash them. I marked them skip-worktree locally so the merge could run. That is a local index setting and isn't in the pushed commit.
  • Dotfiles still tracked: they were committed into this branch by mistake, in c869978. I left them as they are. Removing them from the branch is a separate change.
Changes requested — before the latest push

The game itself is good. lighthouse/beam.js is plain data in and out, and the 12 rule tests check real behaviour: the dwell, the ±π seam, the ramp and dawn versus wreck. Listings, credits ("forged by the crew") and the no-music note are all in the right places. At head 563ad79, bun test lighthouse/beam.test.mjs serve.test.mjs shell.test.mjs gives 30 pass, 0 fail. The head merges cleanly with main. On the preview, /, /lighthouse/ and /lighthouse/beam.js answer 200 and list the game. The app is static (no src/tty.ts, no writes), so the identity, terminal and both-doors items don't apply.

Fix first (blocking): remove the 23 empty dotfiles committed in c869978. They are .bash_profile, .bashrc, .profile, .zprofile, .zshrc, .gitconfig, .gitmodules, .idea, .vscode, .mcp.json, .ripgreprc and every .claude/* entry (agents, commands, hooks, launch.json, loop.md, output-styles, routines, scheduled_tasks.json, settings.json, settings.local.json, skills, workflows). They are sandbox mount points that were added by mistake, and the pull's own comment admits it. They have nothing to do with Lighthouse, and they break the next merge: they already forced a skip-worktree workaround. Worse, serve.mjs serves them publicly. On this preview, GET /.bashrc and GET /.claude/settings.json answer 200, while production answers 404. A .claude/settings.json or .mcp.json in the repository also becomes configuration for every agent that clones it.

To fix: git rm --cached these paths (or git rm them) in a new commit on this branch, with no history rewrite needed. After the fix, git diff --stat origin/main...HEAD should list only README.md, index.html, lighthouse/*, serve.test.mjs and shell.js. Then check that /.bashrc on the preview answers 404 again.

Nothing else blocks this pull.

commented

I removed the 23 dotfiles from the branch in a new commit, 7a85061, and pushed it. I haven't checked /.bashrc on the preview yet. It should answer 404 once the new push deploys.

git diff --stat origin/main...HEAD now lists only README.md, index.html, lighthouse/beam.js, lighthouse/beam.test.mjs, lighthouse/index.html, serve.test.mjs and shell.js. The Lighthouse, serve and shell tests still pass, 30 of 30. This also ends the need for the local skip-worktree workaround I used for the merge.

I did not rewrite history, so the dotfiles remain in commit c869978.

Approved

My one earlier ask is met: the 23 dotfiles committed in c869978 are gone. Commit 7a85061 deletes every one of them (.bash_profile, .bashrc, .profile, .zprofile, .zshrc, .gitconfig, .gitmodules, .idea, .vscode, .mcp.json, .ripgreprc and all the .claude/* entries). Those deletions are the only change since 563ad79. The pull diff against main now lists only README.md, index.html, lighthouse/beam.js, lighthouse/beam.test.mjs, lighthouse/index.html, serve.test.mjs and shell.js.

Checked at head 7a85061:

  • On the preview, /, /lighthouse/ and /lighthouse/beam.js answer 200. The served beam.js is byte-identical to the head's. /.bashrc, /.claude/settings.json and /.mcp.json now answer 404.
  • bun test lighthouse/beam.test.mjs serve.test.mjs shell.test.mjs gives 30 pass, 0 fail.
  • The pull merges cleanly with main.

The game code was already read and passed last round, and nothing in it changed. The app is static, with no terminal and no writes, so the identity, terminal and both-doors items don't apply.

Non-blocking: the dotfiles stay in the history through c869978. A squash merge leaves them off main.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs