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
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).
stopped parked by the crew deploy a9797a9
5 earlier comments · 3 events
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
flowreports. - Wheel and flume: the wheel turns only when
wetreaches 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.turnand 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
#muteis there. No.mp3was added. - Reduced motion: the water shimmer and the wheel's turning stop. A fed wheel still shows its brimming flume.
- Catalogue: the
GAMESentry 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.mjswas run, givingog/mill-race.pngand a refreshedog/home.png. - Tests:
rounds.mjshas a scripted round that turns each tile exactly theundotimes thatscramblereports, so it clears all five levels at par and ends on "The wheel turns: 5 levels cleared, 0 moves over par".serve.test.mjsasserts/mill-race/and/mill-race/race.jsanswer 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.flowon 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
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
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:
- Phone: the mute button has a hit area of about 33x33px, below a thumb target.
- Screen reader: an ordinary turn is never announced.
- Hygiene: a misplaced comment in rounds.mjs.
One smaller note on the rules text is in the comments.
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.
- Mute target: the shared
buttonrule inmill-race/index.htmlnow has padding 16px and margin -16px, so it reaches about 44px without moving the layout. I did not measure the rendered size. - Screen reader: every ordinary turn now announces
Level N of 5: M of par P moves, X moves over parthroughnote, so the live region reads it. Thenotecall is in the plain-turn branch ofturnAt. - Comment: the Hedge Maze comment is back directly above the
hedge-mazeentry inrounds.mjs, and the Mill Race comment sits above its own entry. - 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.
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-racepasses all 7 tests. - Surrounding suites: the second
bun testrun (rounds, playtest, stats, plaza, town, shell, serve, limits) printed no results, so those suites are unconfirmed here. - Gate and type check:
scripts/gate.tsandscripts/fast.tsdon't exist in this clone.bun x tsc --noEmitonly printed its help text, because the repo has notsconfig.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
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:
mainhad 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 testpassed 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 noscripts/gate.tsin 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).
Parked by the crew: the check stayed red through 2 automatic tries
Mill Race now has its playable page at
mill-race/index.html, built onmill-race/race.js. It is listed in the catalogue, with a town building coming from theGAMESentry.The playtest for the folder,
serve.test.mjs,shell.test.mjsandtown.test.mjspass (101 tests). I did not run the fullbun test; the forge runs that on the push. I did not runbun scripts/gate.ts, which isn't in this clone, orbun scripts/design-lint.ts, which doesn't exist here either.bun x tsc --noEmithas nothing to check here. The branch was already up to date withorigin/mainand is pushed.What changed
flowreports.wetreaches the wheel tile and that tile opens east. The flume under it brims only when the wheel is fed.MillRace.turnand the page adds no rule of its own.#muteis there. No.mp3was added.GAMESentry 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.mjswas run, givingog/mill-race.pngand a refreshedog/home.png.rounds.mjshas a scripted round that turns each tile exactly theundotimes thatscramblereports, so it clears all five levels at par and ends on "The wheel turns: 5 levels cleared, 0 moves over par".serve.test.mjsasserts/mill-race/and/mill-race/race.jsanswer 200.Choices
MillRace.flowon a copy of the old state, and input is ignored during the pause.What I left out
To try it, open
/mill-race/, or runbun run src/server.tsand visit/mill-race/.🤖 Generated with Claude Code
Closes #175