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

Migrated from github.com/amirmushichge/pixel-plays

Add Mill Race: the playable page and its place in the catalogue, on the rules in `mill-race/race.js` #207

Parked opened this
Closed without merging

Mill Race now has its playable page at mill-race/index.html, built on mill-race/race.js. It is listed in the catalogue, with a town building coming from the GAMES entry. The playtest for the folder, serve.test.mjs, shell.test.mjs and town.test.mjs pass (101 tests).

Notes

stopped parked by the crew deploy a9797a9

opened this

Mill Race now has its playable page at mill-race/index.html, built on mill-race/race.js. It is listed in the catalogue, with a town building coming from the GAMES entry.

The playtest for the folder, serve.test.mjs, shell.test.mjs and town.test.mjs pass (101 tests). I did not run the full bun test; the forge runs that on the push. I did not run bun scripts/gate.ts, which isn't in this clone, or bun scripts/design-lint.ts, which doesn't exist here either. bun x tsc --noEmit has nothing to check here. The branch was already up to date with origin/main and is pushed.

What changed

  • Drawing: the page draws the stone channel tiles at the fixed 30° camera. Wet channels are filled troughs and dry ones are empty muddy beds. The water that fills them is exactly the cells flow reports.
  • Wheel and flume: the wheel turns only when wet reaches the wheel tile and that tile opens east. The flume under it brims only when the wheel is fed.
  • Input: tap a tile to turn it, or move the cursor with the arrow keys and turn with Space or Enter. A turn goes through MillRace.turn and the page adds no rule of its own.
  • HUD: it shows level, moves, par and moves over par, plus the rules' own status line. The canvas aria-label says how to play, the rules popup is three lines, and #mute is there. No .mp3 was added.
  • Reduced motion: the water shimmer and the wheel's turning stop. A fed wheel still shows its brimming flume.
  • Catalogue: the GAMES entry is exactly as specified, with the matching root <li>, a README Games row, and Mill Race added to the no-music list and the ambient-motion paragraph. bun scripts/og.mjs was run, giving og/mill-race.png and a refreshed og/home.png.
  • Tests: rounds.mjs has a scripted round that turns each tile exactly the undo times that scramble reports, so it clears all five levels at par and ends on "The wheel turns: 5 levels cleared, 0 moves over par". serve.test.mjs asserts /mill-race/ and /mill-race/race.js answer 200.

Choices

  • The page holds the cleared picture for 1.2 s before the next level, so the fed wheel is seen turning. This is presentation only. It reuses MillRace.flow on a copy of the old state, and input is ignored during the pause.
  • The board is always 16 units wide, so tiles are larger on small levels and the sluice, flume and wheel scale to match.
  • Arrow keys follow the Hedge Maze convention: up moves the cursor to the north tile, which is up and to the right on screen.

What I left out

  • No best-score storage.
  • No animation of the turning tile; it changes instantly.

To try it, open /mill-race/, or run bun run src/server.ts and visit /mill-race/.

🤖 Generated with Claude Code

Closes #175

5 earlier comments · 3 events
commented

Mill Race now has its playable page at mill-race/index.html, built on mill-race/race.js. It is listed in the catalogue, with a town building coming from the GAMES entry.

The playtest for the folder, serve.test.mjs, shell.test.mjs and town.test.mjs pass (101 tests). I did not run the full bun test; the forge runs that on the push. I did not run bun scripts/gate.ts, which isn't in this clone, or bun scripts/design-lint.ts, which doesn't exist here either. bun x tsc --noEmit has nothing to check here. The branch was already up to date with origin/main and is pushed.

What changed

  • Drawing: the page draws the stone channel tiles at the fixed 30° camera. Wet channels are filled troughs and dry ones are empty muddy beds. The water that fills them is exactly the cells flow reports.
  • Wheel and flume: the wheel turns only when wet reaches the wheel tile and that tile opens east. The flume under it brims only when the wheel is fed.
  • Input: tap a tile to turn it, or move the cursor with the arrow keys and turn with Space or Enter. A turn goes through MillRace.turn and the page adds no rule of its own.
  • HUD: it shows level, moves, par and moves over par, plus the rules' own status line. The canvas aria-label says how to play, the rules popup is three lines, and #mute is there. No .mp3 was added.
  • Reduced motion: the water shimmer and the wheel's turning stop. A fed wheel still shows its brimming flume.
  • Catalogue: the GAMES entry is exactly as specified, with the matching root <li>, a README Games row, and Mill Race added to the no-music list and the ambient-motion paragraph. bun scripts/og.mjs was run, giving og/mill-race.png and a refreshed og/home.png.
  • Tests: rounds.mjs has a scripted round that turns each tile exactly the undo times that scramble reports, so it clears all five levels at par and ends on "The wheel turns: 5 levels cleared, 0 moves over par". serve.test.mjs asserts /mill-race/ and /mill-race/race.js answer 200.

Choices

  • The page holds the cleared picture for 1.2 s before the next level, so the fed wheel is seen turning. This is presentation only. It reuses MillRace.flow on a copy of the old state, and input is ignored during the pause.
  • The board is always 16 units wide, so tiles are larger on small levels and the sluice, flume and wheel scale to match.
  • Arrow keys follow the Hedge Maze convention: up moves the cursor to the north tile, which is up and to the right on screen.

What I left out

  • No best-score storage.
  • No animation of the turning tile; it changes instantly.

To try it, open /mill-race/, or run bun run src/server.ts and visit /mill-race/.

🤖 Generated with Claude Code

commented

The preview's test run most likely hit the 600 s limit because Mill Race's page was slow under the playtest's software renderer. I've sped it up and pushed the fix. I did not run the full suite here, and I haven't seen the forge's new check result.

Cause: the page rebuilt the whole tile layer every time the water shimmer stepped, 8 times a second. That is hundreds of thousands of box draws each time, and the five Mill Race playtests alone took about 51 s.

Fix: the tile layer is now rebuilt only when something changes (a turn, the cursor, a new level or the hold). The shimmer is a few small glints drawn over it each step. Under reduced motion the glints stay off, as before.

Result: the five Mill Race playtests now run in 9.4 s locally. The glints appear on all wet water pieces, including the sluice and flume.

What I'm unsure of: a 600 s overrun may also reflect the suite growing as games are added, so the forge's check is the real confirmation. I also regenerated og/mill-race.png and og/home.png with bun scripts/og.mjs.

🤖 Generated with Claude Code

Changes requested — before the latest push

Mill Race loads in the preview (/mill-race/ and race.js both 200) and is wired into the catalogue, README, share card and playtest. Three things to fix in one round, the first being the most important:

  1. Phone: the mute button has a hit area of about 33x33px, below a thumb target.
  2. Screen reader: an ordinary turn is never announced.
  3. Hygiene: a misplaced comment in rounds.mjs.

One smaller note on the rules text is in the comments.

commented

All four points are addressed and pushed to the same branch. The Mill Race playtests and the 79 tests in serve.test.mjs and shell.test.mjs pass here; I did not run the rest of the suite.

  1. Mute target: the shared button rule in mill-race/index.html now has padding 16px and margin -16px, so it reaches about 44px without moving the layout. I did not measure the rendered size.
  2. Screen reader: every ordinary turn now announces Level N of 5: M of par P moves, X moves over par through note, so the live region reads it. The note call is in the plain-turn branch of turnAt.
  3. Comment: the Hedge Maze comment is back directly above the hedge-maze entry in rounds.mjs, and the Mill Race comment sits above its own entry.
  4. Rules text: I added a fourth line, "The arrows follow the board, not the screen: up goes up and to the right." The popup is still within four lines.
the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Mill Race is merged with the latest main and pushed; the forge's check on the new push has not reported back yet.

The merge commit 0bc6bb4 was already on the branch from before the restart. main is still at 9a10fcc (Market Barrow, #206) and is contained in the branch, so there were no conflicts to resolve. What I pushed was that merge commit, which the remote didn't have yet.

Checks I ran here:

  • Mill Race tests: bun test mill-race passes all 7 tests.
  • Surrounding suites: the second bun test run (rounds, playtest, stats, plaza, town, shell, serve, limits) printed no results, so those suites are unconfirmed here.
  • Gate and type check: scripts/gate.ts and scripts/fast.ts don't exist in this clone. bun x tsc --noEmit only printed its help text, because the repo has no tsconfig.json.

The full suite is left to the forge's check on this push.

What the pull does: it adds Mill Race, the playable page mill-race/index.html on the rules in mill-race/race.js, and its place in the catalogue. It also has the earlier polish: a 44px mute target, each turn announced, the arrows' direction in the rules, and the water glint rebuilt only on a change so the page and its playtest run in a fifth of the time.

To try it: open the preview at https://pixel-plays--207--forge-trevato-apps.open-platform.sh and reach Mill Race from the catalogue.

🤖 Generated with Claude Code

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Mill Race, the playable page, is now merged with current main and pushed. I think the preview failed because my branch was behind main; the cut-off log never showed an actual failure. I haven't re-run the full suite on the merged result.

  • Cause: main had gained Ferris Wheel, Lily Pond and Shunting Yard since my branch last merged it, so my branch no longer matched it.
  • Conflicts fixed:

- README.md: I kept main's text and added Mill Race back to the no-music list and the ambient-motion list. - rounds.mjs: I kept both sets of scripted rounds. - og/home.png: I regenerated it with bun scripts/og.mjs.

  • Checks: Before merging, the full bun test passed on my branch, 1183 tests across 77 files, but it took about 524 seconds. After merging, I ran the serve, shell, plaza and town tests, the Mill Race rules tests, and the scripted-round playtests for Mill Race, Ferris Wheel, Lily Pond and Shunting Yard. All passed.
  • Not run: I did not run bun x tsc --noEmit, and there is no scripts/gate.ts in this repo. The forge's check runs the whole suite on this push.
  • Left alone: I did not touch Mill Race's code or the playtest harness.

To try it, run bun serve.mjs and open /mill-race/ (or the Mill Race card on the home page).

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs