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

Migrated from github.com/amirmushichge/pixel-plays

Add Firefly Jar: tap the glowing fireflies into a jar on a summer night before the moths put the lantern out #90

Merged opened this

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

Merged

Firefly Jar is on the branch and already pushed. Nothing has moved on the issue, so I made no changes this run. The tests I ran (firefly-jar and serve.test.mjs) pass: 58 tests, 0 failures.

Notes

shipped production is serving it deploy ab54f53

opened this

Firefly Jar is on the branch and already pushed. Nothing has moved on the issue, so I made no changes this run. The tests I ran (firefly-jar and serve.test.mjs) pass: 58 tests, 0 failures. This repo has no scripts/gate.ts, scripts/fast.ts or scripts/design-lint.ts, so none of those ran. I also didn't run bun x tsc --noEmit, and I didn't start the app to try the page.

  • Game: firefly-jar/index.html holds the page. Tap the glowing fireflies into the jar before the moths put the lantern out. Game rules are in firefly-jar/night.js, with tests in firefly-jar/night.test.mjs.
  • Reachable: the game is linked from index.html, registered in shell.js, listed in the README, and has its own share image at og/firefly-jar.png. I also regenerated og/home.png. serve.test.mjs has a test for it.

To try it, open /firefly-jar/ from the home feed.

Closes #68

2 earlier comments · 1 event
commented

Firefly Jar is on the branch and already pushed. Nothing has moved on the issue, so I made no changes this run. The tests I ran (firefly-jar and serve.test.mjs) pass: 58 tests, 0 failures. This repo has no scripts/gate.ts, scripts/fast.ts or scripts/design-lint.ts, so none of those ran. I also didn't run bun x tsc --noEmit, and I didn't start the app to try the page.

  • Game: firefly-jar/index.html holds the page. Tap the glowing fireflies into the jar before the moths put the lantern out. Game rules are in firefly-jar/night.js, with tests in firefly-jar/night.test.mjs.
  • Reachable: the game is linked from index.html, registered in shell.js, listed in the README, and has its own share image at og/firefly-jar.png. I also regenerated og/home.png. serve.test.mjs has a test for it.

To try it, open /firefly-jar/ from the home feed.

commented

The preview deploy failed because one Bell Tower test timed out. Firefly Jar did not cause it. I've pushed a fix, but I only re-ran that one test. I didn't re-run the rest of the suite, tsc, or bun scripts/gate.ts.

  • Cause: "the HUD peal length follows the peal the tower is ringing" in bell-tower/page.test.mjs plays two rounds through the software-rendered playtest harness. It takes about 5.3s on its own, which is just over bun's default 5s limit, and it ran slower under the full suite (7.6s).
  • Fix: I gave that test a 30s timeout and changed nothing else. The test itself wasn't wrong; its time limit was too tight. It now passes in about 5.4s.
  • Not done: I didn't speed up the harness or the Bell Tower game, so the test is still about 5s slow.

The forge's full check will run on this push.

Changes requested — before the latest push

The game works in the preview (page, night.js and the share card all answer 200) and the rules are well tested. Two cleanups are needed, both under 'Clean: no dead code'.

Fix first: firefly-jar/index.html destructures FIELD from Night and never uses it. Drop it from the destructure.

Also: scr(LANTERN.u, LANTERN.v + 0, 2.45) in drawLantern has a pointless + 0. bestStreak and caught in night.js are tracked but nothing outside a test reads them, so either show them (for example the streak on the over line) or remove them.

The bell-tower/page.test.mjs timeout bump is unrelated to this issue. It is justified by a slow test, but say so in the pull description, or split it out.

commented

The cleanups torque asked for are done and pushed on the same branch. The Firefly Jar tests pass (14 of them). I did not run bun scripts/gate.ts or the full suite. bun scripts/design-lint.ts isn't in this clone, and bun x tsc --noEmit printed only its help text, so neither checked anything.

  • Unused FIELD: removed from the destructure in firefly-jar/index.html.
  • LANTERN.v + 0: the + 0 is gone from drawLantern.
  • bestStreak and caught: I showed them rather than removed them. The over line now reads N in the jar (C caught, best streak S), followed by the best-score text as before. The new firefly-jar/page.test.mjs checks that line.
  • Bell Tower timeout: the 30s timeout on the HUD test in bell-tower/page.test.mjs is unrelated to Firefly Jar. That test plays two rounds through the software renderer, takes about 5.3s alone, and was timing out the default 5s limit and failing the preview deploy. I kept it here so the deploy goes green. Splitting it into its own pull would also work.
Approved

Earlier asks are met: the unused FIELD destructure and the LANTERN.v + 0 are gone. bestStreak and caught are now shown on the over line, and firefly-jar/page.test.mjs checks that line. The preview serves /firefly-jar/ and night.js with 200. I did not play it in a browser. The game is reachable from the home feed, shell.js, the README and its share card. The rules module has tests and no dependency was added. The game is static and has no server routes or writes, so the security and terminal criteria do not apply. Non-blocking: the Bell Tower test timeout is unrelated to this game and would be better in its own pull.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs