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

Migrated from github.com/amirmushichge/pixel-plays

Add Ice Fishing: drop a line through the ice and reel each fish up before the line snaps #58

Merged opened this

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

Merged

Ice Fishing is in: /ice-fishing/ shows a square of frozen lake with a round hole, a stool, a tackle box and a bucket, and a cut-away of the water on the front-left face. bun test ice-fishing serve.test.mjs shell.test.mjs passes (54 tests) and the branch is pushed. I haven't played it in a browser.

Notes

shipped production is serving it deploy ab54f53

opened this

Ice Fishing is in: /ice-fishing/ shows a square of frozen lake with a round hole, a stool, a tackle box and a bucket, and a cut-away of the water on the front-left face. bun test ice-fishing serve.test.mjs shell.test.mjs passes (54 tests) and the branch is pushed. I haven't played it in a browser. The only visual check was the opening-frame card, which I looked at.

What changed

  • Rules are in ice-fishing/hole.js as plain data in and out, with 15 tests in hole.test.mjs. Hold lets line out, and perch, trout and pike swim at three depths worth 1, 2 and 3. A fish at the hook's depth that crosses it bites. Once hooked, holding reels and tension rises faster for bigger fish; letting go lowers it, but the fish runs the hook deeper. Full tension snaps the line for a strike. A fish reeled to the hole lands in the bucket. The round ends at 60 seconds or three strikes. The tests cover every case in the issue.
  • Page is ice-fishing/index.html on the shared engine, 360x280 with hard shadows screen-right. The HUD shows score, strikes, a tension bar (it goes red above 75%) and best. Snow drifts across the ice. A tension tug and an expanding yellow ring mark the bite; a red line snap and a fish arcing into the bucket mark the other two events. Snow, fish bobbing and rod shake stop under prefers-reduced-motion.
  • Input is press and hold on the canvas, or hold space or enter. The canvas aria-label says how to play, the rules popup is four lines, and #mute is there. No .mp3 is committed.
  • Wiring is the same set of places as the other forged games:

- The GAMES entry in shell.js (forged: true, music: false). - The matching index.html list item and the README Games table row. - A serve.test.mjs test that the page and hole.js answer 200. - Regenerated og/ice-fishing.png, og/home.png and the share tags, because the existing og test compares the committed cards byte for byte.

Choices

  • The hook can't be raised without a fish on it, so holding past the bottom (depth 9) turns the line back up, and it turns down again at the top. That stands in for a separate "raise" control.
  • The kind is Timing and the input Hold, so the card reads "Timing · Hold".
  • Not added: no music, no dependencies, and no per-fish sprite animation beyond the bob.

Try it

  • bun serve.mjs, then open /ice-fishing/.
  • Hold the canvas or space until the hook sits at a fish's depth: about 2 for perch, 4.5 for trout, 7 for pike.
  • When a fish bites, keep holding to reel and let go before the bar reaches the dotted line.

bun x tsc --noEmit and scripts/design-lint.ts didn't apply: there's no package.json, tsconfig.json or src/web. I didn't run the full suite; the forge's check does that on this push.

Closes #40

2 earlier comments · 2 events
commented

Ice Fishing is in: /ice-fishing/ shows a square of frozen lake with a round hole, a stool, a tackle box and a bucket, and a cut-away of the water on the front-left face. bun test ice-fishing serve.test.mjs shell.test.mjs passes (54 tests) and the branch is pushed. I haven't played it in a browser. The only visual check was the opening-frame card, which I looked at.

What changed

  • Rules are in ice-fishing/hole.js as plain data in and out, with 15 tests in hole.test.mjs. Hold lets line out, and perch, trout and pike swim at three depths worth 1, 2 and 3. A fish at the hook's depth that crosses it bites. Once hooked, holding reels and tension rises faster for bigger fish; letting go lowers it, but the fish runs the hook deeper. Full tension snaps the line for a strike. A fish reeled to the hole lands in the bucket. The round ends at 60 seconds or three strikes. The tests cover every case in the issue.
  • Page is ice-fishing/index.html on the shared engine, 360x280 with hard shadows screen-right. The HUD shows score, strikes, a tension bar (it goes red above 75%) and best. Snow drifts across the ice. A tension tug and an expanding yellow ring mark the bite; a red line snap and a fish arcing into the bucket mark the other two events. Snow, fish bobbing and rod shake stop under prefers-reduced-motion.
  • Input is press and hold on the canvas, or hold space or enter. The canvas aria-label says how to play, the rules popup is four lines, and #mute is there. No .mp3 is committed.
  • Wiring is the same set of places as the other forged games:

- The GAMES entry in shell.js (forged: true, music: false). - The matching index.html list item and the README Games table row. - A serve.test.mjs test that the page and hole.js answer 200. - Regenerated og/ice-fishing.png, og/home.png and the share tags, because the existing og test compares the committed cards byte for byte.

Choices

  • The hook can't be raised without a fish on it, so holding past the bottom (depth 9) turns the line back up, and it turns down again at the top. That stands in for a separate "raise" control.
  • The kind is Timing and the input Hold, so the card reads "Timing · Hold".
  • Not added: no music, no dependencies, and no per-fish sprite animation beyond the bob.

Try it

  • bun serve.mjs, then open /ice-fishing/.
  • Hold the canvas or space until the hook sits at a fish's depth: about 2 for perch, 4.5 for trout, 7 for pike.
  • When a fish bites, keep holding to reel and let go before the bar reaches the dotted line.

bun x tsc --noEmit and scripts/design-lint.ts didn't apply: there's no package.json, tsconfig.json or src/web. I didn't run the full suite; the forge's check does that on this push.

commented

I merged main into the branch and pushed it (92c93e4). The only conflict was og/home.png, the share-card collage of every game's opening scene. A binary file can't be merged, so I regenerated it with bun scripts/og.mjs. It now includes both Beekeeper and Ice Fishing.

shell.js, index.html, README.md and serve.test.mjs merged without conflicts. Each file keeps both the Beekeeper and the Ice Fishing entries. bun test ice-fishing beekeeper serve.test.mjs shell.test.mjs passes (74 tests). I did not run the full suite; the forge's check does that on the push.

Changes requested — before the latest push

The game is good and works in the preview. /ice-fishing/, hole.js, /og/ice-fishing.png and the home card all answer 200, and the security headers are on. The rules module is plain data in and out, the 15 rule tests cover the issue, and bun test ice-fishing serve.test.mjs shell.test.mjs passes at 92c93e4 (55 pass). Crediting the game to the crew in the README, the shell and the home card follows the direction. This static app has no terminal door, so the tty item doesn't apply.

Fix first: the pull cannot land. The forge reports mergeable: false against main 9c2022a, with conflicts in README.md, index.html, og/home.png, serve.test.mjs and shell.js. Bread Oven (#54) landed after your merge of fd12dfd. To fix it:

  • Merge current main again.
  • Keep both the Bread Oven and the Ice Fishing entries in the GAMES list in shell.js, the home list in index.html, the README table and serve.test.mjs.
  • Regenerate og/home.png with bun scripts/og.mjs so the byte-for-byte og test passes.
  • Run bun test ice-fishing bread-oven serve.test.mjs shell.test.mjs.

Two smaller fixes for the same round:

  1. hole.test.mjs:152: the 'fish swim across' test runs on Math.random, so a failure can't be reproduced. Use a seeded rng, such as a small LCG, like the rest of the file uses fixed rngs.
  2. The rules popup and the canvas aria-label say "release to stop". They don't say that a held line turns at the bottom (depth 9) and comes back up, which is the only way to raise an empty hook. Add that to the rules line so a player can find it.
Changes requested — before the latest push

The head is still 92c93e4, the same commit I reviewed last round, so nothing has changed and none of the three asks is met. The preview still serves /ice-fishing/ and hole.js (200), but /bread-oven/ is 404 there because the branch predates #54.

Earlier asks:

  1. Not met, and fix this first: the pull cannot land. The forge still reports mergeable: false against main 9c2022a (Bread Oven, #54). To fix it:

- Merge current main. - Keep both the Bread Oven and the Ice Fishing entries in shell.js GAMES, the index.html list, the README table and serve.test.mjs. - Regenerate og/home.png with bun scripts/og.mjs. - Run bun test ice-fishing bread-oven serve.test.mjs shell.test.mjs.

  1. Not met: hole.test.mjs:152, the 'fish swim across' test, still runs on Math.random. Use a seeded rng, such as a small LCG.
  2. Not met: the rules popup and the canvas aria-label still say "release to stop". They don't say that a held line turns at depth 9 and comes back up, which is the only way to raise an empty hook. Add one clause to the first rules line and to the aria-label.

I have no new asks, since no lines changed. This is the last round of changes: whatever is left after it lands as it is.

commented

Adds Ice Fishing, a new forged game at /ice-fishing/. A square of frozen lake with a round hole, a stool, a tackle box and a bucket, plus a cut-away of the water under the ice on the front face.

How it plays

  • Hold the canvas or space to let line out, and release to stop. If you keep holding, the line turns at the bottom (depth 9) and comes back up. That is the only way to raise an empty hook, and both the rules popup and the canvas aria-label say so.
  • Perch (1 point), trout (2) and pike (3) swim across at three depths. A fish that crosses the hook at its own depth bites, shown by a yellow ring and a tug on the rod.
  • Once a fish is hooked, holding reels it in. Tension rises faster the bigger the fish. Letting go lets tension fall, but the fish runs the hook deeper.
  • Full tension snaps the line and costs a strike. A fish reeled to the hole drops into the bucket.
  • A round lasts 60 seconds or three snapped lines. The HUD shows score, strikes, a tension bar, the bucket and best. Snow drifts across the ice; snow, fish bobbing and rod shake stop under prefers-reduced-motion.

What to look at

  • Rules: ice-fishing/hole.js holds the rules as plain data in and out. hole.test.mjs has 15 tests, and the fish-swim test uses a seeded random generator so a failure can be reproduced.
  • Page: ice-fishing/index.html draws on the shared engine. It has the #mute button and commits no .mp3.
  • Listings: the game is in GAMES in shell.js, the home list in index.html, the README Games table, and serve.test.mjs. Each keeps Bread Oven (from main) and adds Ice Fishing after it.
  • Share cards: og/ice-fishing.png is new, and og/home.png was regenerated with bun scripts/og.mjs after merging current main.

Choices

  • The game is filed as Timing / Hold.
  • I didn't add a separate "raise the hook" control; turning at the bottom does that job with the one hold input.

Try it

  • Run bun serve.mjs and open /ice-fishing/.
  • Hold until the hook sits at a fish's depth: about 2 for perch, 4.5 for trout, 7 for pike.
  • When a fish bites, hold to reel and let go before the bar reaches the dotted line.

bun test ice-fishing bread-oven serve.test.mjs shell.test.mjs passes (66 tests); I didn't run the full suite.

🤖 Generated with Claude Code

Approved

Round 3, head 2dbf79d. The forge now reports mergeable: true against main 9c2022a, with no conflicts.

Earlier asks:

  1. Met: the merge. Current main is merged in. Bread Oven and Ice Fishing are both listed in shell.js GAMES, the index.html list, the README table and serve.test.mjs. og/home.png was regenerated, and the byte-for-byte og test in serve.test.mjs passes.
  2. Met: seeded rng. hole.test.mjs now has a small seeded() LCG, and the 'fish swim across' test uses it instead of Math.random.
  3. Met: the hold rule. The first rules line and the canvas aria-label both now say that a held line turns at the bottom and comes back up.

Checked at this head: bun test ice-fishing bread-oven serve.test.mjs shell.test.mjs gives 66 pass, 0 fail. On the preview, /, /ice-fishing/, /ice-fishing/hole.js, /bread-oven/, /og/ice-fishing.png and /og/home.png all answer 200. The served page carries the new rules text, and the home list links both games.

No new asks: since my last review the only changed lines are these fixes and the merge.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs