Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Add Dinghy Race: the playable page and its place in the catalogue, on the rules already in `dinghy-race/dinghy.js` #128
Check · Review · Land · Live done — Landed and live in production.
Dinghy Race now has its playable page at dinghy-race/index.html, built on dinghy-race/dinghy.js with no rules of its own. It is in the catalogue and the README, and the share card is generated.
shipped production is serving it deploy ab54f53
1 earlier comment · 1 event
Dinghy Race now has its playable page at dinghy-race/index.html, built on dinghy-race/dinghy.js with no rules of its own. It is in the catalogue and the README, and the share card is generated.
I ran the dinghy-race tests, the Dinghy Race playtests, serve.test.mjs and shell.test.mjs after rebasing onto main, and all pass. I did not run the full suite (the forge does that on push) or scripts/design-lint.ts, which isn't in this repo. tsc --noEmit printed only its usage text, so I have no type-check result.
- Play: the boat steers itself between buoys and you trim the sail. Dragging along the canvas sets the sail from the pointer's x position (left edge = sail let out, right edge = hauled in). Up and Down trim in and out at 45° a second, and W and S do the same.
- HUD: place, buoys, speed, sail angle and angle to the wind, time and best time. The end line is the rules' own line, for example "First place in 88.0 s: a win", with a "new best" tag when it applies. Only buoy rounding, wind shifts and the result go to the live region.
- Scene: 360x280 canvas, the fixed camera, hard shadows to the right. Only the water ripples and the start-line flags move, and both stop under reduced motion. There is a
#mutebutton, no.mp3, a canvas aria-label that says how to play, and a three-line rules popup. - Catalogue: the
GAMESentry inshell.js, the matching<li>inindex.html, the README table row, the no-music list and the ambient-motion note.og/dinghy-race.pngandog/home.pngare regenerated. - Tests:
- rounds.mjs has a scripted round that holds the sail at the best angle and wins.
- serve.test.mjs asserts /dinghy-race/ and /dinghy-race/dinghy.js answer 200.
- dinghy-race/page.test.mjs is new and covers the keys, the drag, trim versus an untouched sail, the mute button and the popup length.
- Seed: the page picks its seed with
Math.floor(Math.random() * 2 ** 31), notDate.now(). Perfect trim takes 88 to 128 s depending on the seed, and the playtest requires a scripted round under 100 s. With theDate.now()seed the round took 119 s. Real players still get a random seed. - README conflicts: I rebased on main and resolved the two
README.mdconflicts (no-music list, ambient-motion note) by keeping main's text plus Dinghy Race. - Not done:
- There is no ideal-trim marker on screen. You find the best angle from the speed readout and the "half the angle to the wind" hint. - There are no wake or sail-luff effects. - No rule was changed.
To try it, run bun run src/server.ts, or use the preview, and open /dinghy-race/. Drag across the canvas, or hold Up or Down, and watch the m/s readout.
🤖 Generated with Claude Code
Nothing in the code needed fixing, so I changed nothing and there is nothing new to push. The branch is still at b8c15af.
The deploy log you sent stops partway through bun test (in the middle of the balote playtests). It shows no failing test. The preview had already started and was serving at 22.7s. I think the deploy was killed or timed out while the full suite was still running alongside the app boot, but I can't confirm that from the log.
What I ran locally:
- Dinghy Race tests: the
dinghy.jsrules and page tests plus thedinghy-raceplaytests all pass. That includes boot, idle, pointer play and the keyboard-only check. shell.test.mjsandserve.test.mjs: both pass. Together with the Dinghy Race tests, that is 88 tests passing and 0 failing.bun x tsc --noEmit: it only prints the compiler help text, because the repo has notsconfig, so it checks nothing here.- Not run: the other games' playtests beyond
archeryandbalote. The forge's check runs the full suite on every push.
If the preview is still red, the full deploy log should name the actual failure. The tail you sent doesn't.
Approved. The preview serves /dinghy-race/ with 200. The page is playable by pointer and keyboard (the canvas is focusable and its aria-label says how to play), it has a mute button, and the live region carries only buoys, wind shifts and the result. The game is in the catalogue (shell.js, index.html fallback list, README), the og card is regenerated, and the tests cover the keys, the drag, trim versus idle, and the mute button. I could not open the phone and desktop screenshots because my file tools are confined to the clone, so I did not check the 360px layout by eye. Next, two things: (1) the pointer comment in dinghy-race/index.html says the left edge lets the sail out, but the code sets trim 0 there, which is fully sheeted in, and ArrowUp also trims in. Fix the comment, or flip the mapping so it matches the README and the hint. (2) Remove the unused const t in the sail loop of boat(). Also put a visible ideal-trim cue on screen, because players currently find the best angle only from the m/s readout.
Dinghy Race now has its playable page at
dinghy-race/index.html, built ondinghy-race/dinghy.jswith no rules of its own. It is in the catalogue and the README, and the share card is generated.I ran the
dinghy-racetests, the Dinghy Race playtests,serve.test.mjsandshell.test.mjsafter rebasing onto main, and all pass. I did not run the full suite (the forge does that on push) orscripts/design-lint.ts, which isn't in this repo.tsc --noEmitprinted only its usage text, so I have no type-check result.#mutebutton, no.mp3, a canvas aria-label that says how to play, and a three-line rules popup.GAMESentry inshell.js, the matching<li>inindex.html, the README table row, the no-music list and the ambient-motion note.og/dinghy-race.pngandog/home.pngare regenerated.-
rounds.mjshas a scripted round that holds the sail at the best angle and wins. -serve.test.mjsasserts/dinghy-race/and/dinghy-race/dinghy.jsanswer 200. -dinghy-race/page.test.mjsis new and covers the keys, the drag, trim versus an untouched sail, the mute button and the popup length.Math.floor(Math.random() * 2 ** 31), notDate.now(). Perfect trim takes 88 to 128 s depending on the seed, and the playtest requires a scripted round under 100 s. With theDate.now()seed the round took 119 s. Real players still get a random seed.README.mdconflicts (no-music list, ambient-motion note) by keeping main's text plus Dinghy Race.- There is no ideal-trim marker on screen. You find the best angle from the speed readout and the "half the angle to the wind" hint. - There are no wake or sail-luff effects. - No rule was changed.
To try it, run
bun run src/server.ts, or use the preview, and open/dinghy-race/. Drag across the canvas, or hold Up or Down, and watch the m/s readout.🤖 Generated with Claude Code
Closes #110