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

Migrated from github.com/amirmushichge/pixel-plays

Add Rock Pool: the playable page and its place in the catalogue, on the rules in `rock-pool/pool.js` #253

opened this

Merged 33d 5h ago, live in production

Rock Pool now has a playable page at /rock-pool/, listed in the catalogue and driven only by rock-pool/pool.js. The Rock Pool playtests, serve.test.mjs, shell.test.mjs and town.test.mjs pass (110 tests).

Notes

opened this

Rock Pool now has a playable page at /rock-pool/, listed in the catalogue and driven only by rock-pool/pool.js. The Rock Pool playtests, serve.test.mjs, shell.test.mjs and town.test.mjs pass (110 tests). I did not run the full bun test, and bun x tsc --noEmit only printed its usage text because the repo has no tsconfig, so it checked nothing. The repo has no scripts/gate.ts or scripts/fast.ts, so I ran neither. I did not run bun scripts/design-lint.ts either, although this touches web pages. I didn't look at the page in a browser or measure frame time. The only check on the crab drawing is that the playtest renders it without errors.

  • Page: rock-pool/index.html draws the 4×4 rocks from the fixed 30° camera on the 360×280 canvas, with hard shadows to the screen-right. The bucket sits on the sand and shows the crabs caught, and the HUD shows tide seconds left, crabs caught and score. A crab in the open is marked by a raised claw outline as well as its red colour, and every rule comes from RockPool.tick and RockPool.scoop.
  • Input and sound: Tap a rock to scoop. Arrow keys and Space also work. There is a #mute button, the rules popup is three lines, and no .mp3 is committed.
  • Motion: The only ambient motion is the water glinting at the pool's edge, at 8 fps. It stops under prefers-reduced-motion.
  • Catalogue: The GAMES entry in shell.js is exactly as specified, with a matching <li> in the root index.html. The README Games table, the list of games without music and the ambient-motion list are updated. bun scripts/og.mjs has been run, which added og/rock-pool.png and refreshed og/home.png. The town building comes from GAMES, so town.js needed no edit.
  • Tests: rounds.mjs has a scripted round that taps crabs in the first third of their dash. It reaches the end line and wins, whereas an idle twin loses, which the playtest requires. serve.test.mjs asserts that /rock-pool/ and /rock-pool/pool.js answer 200.
  • Decisions: The page's state variable is P rather than S, because engine.js already declares S as its scale constant and the og script failed on the duplicate. The bucket is a box with crabs sitting on top, not a round pail, because the engine only has axis-aligned boxes and spheres. I did not add a crab-versus-rock-position tap rule, since the rules own which cell a crab counts as on.

To try it, run the app and open /rock-pool/. The branch was already up to date with main, so there was nothing to rebase.

Closes #199

3 earlier comments
commented

Rock Pool now has a playable page at /rock-pool/, listed in the catalogue and driven only by rock-pool/pool.js. The Rock Pool playtests, serve.test.mjs, shell.test.mjs and town.test.mjs pass (110 tests). I did not run the full bun test, and bun x tsc --noEmit only printed its usage text because the repo has no tsconfig, so it checked nothing. The repo has no scripts/gate.ts or scripts/fast.ts, so I ran neither. I did not run bun scripts/design-lint.ts either, although this touches web pages. I didn't look at the page in a browser or measure frame time. The only check on the crab drawing is that the playtest renders it without errors.

  • Page: rock-pool/index.html draws the 4×4 rocks from the fixed 30° camera on the 360×280 canvas, with hard shadows to the screen-right. The bucket sits on the sand and shows the crabs caught, and the HUD shows tide seconds left, crabs caught and score. A crab in the open is marked by a raised claw outline as well as its red colour, and every rule comes from RockPool.tick and RockPool.scoop.
  • Input and sound: Tap a rock to scoop. Arrow keys and Space also work. There is a #mute button, the rules popup is three lines, and no .mp3 is committed.
  • Motion: The only ambient motion is the water glinting at the pool's edge, at 8 fps. It stops under prefers-reduced-motion.
  • Catalogue: The GAMES entry in shell.js is exactly as specified, with a matching <li> in the root index.html. The README Games table, the list of games without music and the ambient-motion list are updated. bun scripts/og.mjs has been run, which added og/rock-pool.png and refreshed og/home.png. The town building comes from GAMES, so town.js needed no edit.
  • Tests: rounds.mjs has a scripted round that taps crabs in the first third of their dash. It reaches the end line and wins, whereas an idle twin loses, which the playtest requires. serve.test.mjs asserts that /rock-pool/ and /rock-pool/pool.js answer 200.
  • Decisions: The page's state variable is P rather than S, because engine.js already declares S as its scale constant and the og script failed on the duplicate. The bucket is a box with crabs sitting on top, not a round pail, because the engine only has axis-aligned boxes and spheres. I did not add a crab-versus-rock-position tap rule, since the rules own which cell a crab counts as on.

To try it, run the app and open /rock-pool/. The branch was already up to date with main, so there was nothing to rebase.

commented

I merged main into the branch, fixed the two conflicts, and pushed. serve.test.mjs passes (76 of 76). I didn't run rock-pool/pool.test.mjs again after the merge, and I didn't run the full suite. tsc --noEmit printed its options help instead of a clean pass, so I don't count it as passing. This clone has no scripts/gate.ts or scripts/fast.ts, so neither ran.

  • README.md: Both conflicting paragraphs now carry what both sides added. The no-music list names Patchwork Quilt, Rain Barrel and Rock Pool. The ambient-motion list has Rain Barrel's drifting clouds and Rock Pool's shimmering edge water.
  • og/home.png: This is the generated home share card, so I didn't merge it by hand. I ran bun scripts/og.mjs, which rebuilt it with both Rain Barrel and Rock Pool. The test that checks every committed card against what the games render now passes with it. Re-running the script touched only og/home.png.
commented

I merged main into the branch again and pushed. og/home.png was the only conflict.

I regenerated that file with bun scripts/og.mjs instead of picking a side, since it's the generated home share card. The regenerated card includes Rock Pool.

bun test serve.test.mjs rock-pool passes (84 tests, 0 failures). I didn't run the full suite or bun x tsc --noEmit this time; the forge's check runs the full suite on the push.

commented

I merged main into the branch and pushed it. The full bun test run passed (1387 tests, 0 failures).

  • README.md, index.html and shell.js: each conflict was main adding Mill Race where this pull adds Rock Pool, so I kept both. The catalogue entry, the home card and the ambient-motion notes now cover both games. The "Create <id>/index.html" line was identical on both sides, so I kept one copy.
  • og/home.png: I regenerated it with bun scripts/og.mjs instead of picking one side. The script also redrew the other share cards, including og/mill-race.png and Rock Pool's.
  • Checks I couldn't run: the repo has no scripts/gate.ts or scripts/fast.ts. bun x tsc --noEmit printed only its usage text, so there's no tsconfig and it didn't check anything.
Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs