Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Add Go-Kart Fete: three laps of a hay-bale oval, holding the throttle on the straights and lifting for the bends #81
Go-Kart Fete is added as the second Racing game, mounted like the other forged games, and pushed. Tests for go-kart/, serve.test.mjs and shell.test.mjs, plus the go-kart playtests, pass here; I did not run the full suite, so the forge check will.
stopped parked by the crew deploy 334d50d
5 earlier comments · 2 events
Go-Kart Fete is added as the second Racing game, mounted like the other forged games, and pushed. Tests for go-kart/, serve.test.mjs and shell.test.mjs, plus the go-kart playtests, pass here; I did not run the full suite, so the forge check will. There was no scripts/gate.ts, scripts/fast.ts or package.json in this clone, so I skipped gate.ts and tsc. I haven't loaded the page in a real browser either: I looked at stills of the booted scene, including a mid-race crash frame.
What it does
- Rules: these live in
go-kart/lap.jsas plain data in and out, andgo-kart/lap.test.mjsasserts each rule. Hold accelerates, letting go brakes. Entering a bend over its safe speed (65 and 58, alternating) crashes the kart wide into the hay for 1 second. Inside a bend the kart's speed is capped at that bend's safe speed. Rivals lap at fixed paces (5.4, 5.9, 6.3 units/s) and are 5% quicker each race. Finishing first to last scores 3, 2, 1, 0. - Game: three races of three laps, with a win at 6 or more. The tests include a bot that lifts in time and wins the game with 8, which shows a win is reachable. The HUD shows race, lap, position, speed, total and best. The end line says "you win the fete" or "not this time".
- Reading the bends: a yellow marker board with the safe speed stands beside the track before each bend, and a yellow line across the track marks the entry. The boards are drawn flat and never move, so they stay up under reduced motion.
- Motion: only the chequered flag and the spectators' waving move, and both stop under
prefers-reduced-motion. - Input: Space or Up held, or press and hold anywhere on the canvas, is the throttle. A race waits on the grid until the first hold. A press after a race ends starts the next one, and any held throttle is released first so the new race doesn't launch by itself.
- Wiring:
shell.js, the rootindex.html<li>, the README games table, the no-music list and the visual-rules line, and a 200 check inserve.test.mjsare all done.bun scripts/og.mjshas been run, soog/go-kart.png, its share tags and a refreshedog/home.pngare included. The page has#muteand no.mp3is committed.
Left out
- Grass sway: the engine's grass sway is not used, since the issue limits ambient motion to the flag and spectators.
- Collisions and steering: karts don't collide, and there is no steering, since the issue has no such input.
- Dependencies: none added.
To try it
- Open
/go-kart/, hold Space, and lift when the kart nears a board. - Run
bun test go-kart/lap.test.mjs.
🤖 Generated with Claude Code
The merge was already done and pushed. Pull #81's head is f53d87a, which already contains current main (6436bd8), so this run had nothing to merge and there were no conflicts to resolve. I did not re-run the gate, type check or tests, because the tree is unchanged since the last green run.
git push reports "Everything up-to-date", so the branch is in the state the forge already has. No refs/heads/quill/… branch shows up on the remote, only refs/pull/81/head. If the forge still flags the pull as unmergeable, it is probably checking against a stale main. Re-queuing the check should clear it.
What the pull contains: Go-Kart Fete, three laps of a hay-bale oval where you hold the throttle on the straights and lift for the bends. It was added in 0ed02f0 (#77) and then merged with main in f53d87a.
To try it: open the preview at https://pixel-plays--81--forge-trevato-apps.open-platform.sh and pick Go-Kart Fete from the feed.
The game works in the preview: /go-kart/, lap.js and the share card all answer 200, and the rules module is well tested. The list asks for clean code, and a few things are not. Please fix them in one round.
- Fix first:
groundColorin go-kart/index.html has a dead&& truein the start-line condition (... x < -HALF + .3 && true). Remove it. boardSpotassignspand returns it on the next line. ReturnLap.pointAt(...)directly.- The board digits use
top + 3 + dy * 1. Drop the* 1. ordinalis a one-line wrapper overORDINAL, and the code mixesORDINAL[...]withordinal(...). Use one of them.- In
draw()the rivals useLap.rivalPace(i, race) * S_.time, which is not clamped.pointAtwraps by LENGTH, so after a rival finishes, its kart keeps driving round the oval while the finish screen is up. UseLap.rivalDistance(i, S_.race, S_.time)so it stops on the line. - In lap.test.mjs,
Math.PI / 2 + 0is noise. WriteMath.PI / 2. - Add a test that fails without the rival clamp, for example that
rivalDistancenever exceeds TOTAL for any rival at a large time. The current check covers only rival 2.
There is no server code, so the identity, tty and body-cap items do not apply.
All seven points from the review are fixed and pushed as 809f31d. The 17 Go-Kart tests pass. I did not run tsc, and scripts/design-lint.ts doesn't exist in this clone.
- I removed the dead
&& truefrom the start-line condition ingroundColor. boardSpotnow returnsLap.pointAt(...)directly.- The board digits use
top + 3 + dy, without the* 1. - I deleted the
ordinalwrapper and usedORDINAL[n - 1]everywhere. The event positions are always 1–4, so the lookup is safe. draw()now usesLap.rivalDistance(i, S_.race, S_.time), so a rival stops on the line when it finishes instead of circling the oval while the finish screen is up.- In
lap.test.mjs,Math.PI / 2 + 0is nowMath.PI / 2. - I added a test that
rivalDistanceequalsTOTALfor every rival in races 0–4 at a very large time. It would fail without the clamp.
I agree with everything in the review, so there's nothing to push back on.
I merged main into the branch and pushed it as 79d1029. The tests for Go-Kart, Soapbox Derby and serve.test.mjs pass (76 tests). I didn't run the whole suite. bun x tsc --noEmit printed only its help text, because the repository has no tsconfig, so there was no type check.
The conflicts came from Soapbox Derby landing on main next to Go-Kart Fete. I kept both games.
README.md: both games have table rows. The "own sound effects" list now ends "Signal Box, Soapbox Derby and Go-Kart Fete".index.htmlandshell.js: both games are in the no-JS fallback list and inGAMES.og/home.png: I regenerated it withbun scripts/og.mjsinstead of picking one side's binary.
I think the preview failed on a test that timed out under load. I fixed that test and pushed, but I couldn't see the cause in the deploy log, so this is inferred from my own run.
The log you sent stops at the bread-oven playtest, with no failure line in it. I ran the full suite locally: 580 tests passed and 1 failed. The failure was bell-tower/page.test.mjs ("the HUD peal length follows the peal the tower is ringing"). It hit Bun's default 5 s timeout, taking about 7.3 s while the rest of the suite was running. The same test passes alone in about 8 s for the whole bell-tower folder.
- Go-Kart: its own tests pass (17 in
go-kart/, plus its 4 playtest cases). It runs no slower than the other games, so it isn't the cause. - The fix: that test now has a 60 s timeout. I changed only the timeout; the assertions are the same. The change is in
bell-tower/page.test.mjs. - Not verified: the full suite takes about 280 s here, almost all of it the per-game playtests, and I didn't re-run it after the fix. If the preview deploy has a time limit shorter than that, it could still fail for that reason. I didn't change anything for that.
To try it, open /go-kart/ on the preview. Run bun test bell-tower go-kart to check the two folders locally.
Parked by the crew: the check stayed red through 2 automatic tries
Go-Kart Fete is added as the second Racing game, mounted like the other forged games, and pushed. Tests for
go-kart/,serve.test.mjsandshell.test.mjs, plus the go-kart playtests, pass here; I did not run the full suite, so the forge check will. There was noscripts/gate.ts,scripts/fast.tsorpackage.jsonin this clone, so I skippedgate.tsandtsc. I haven't loaded the page in a real browser either: I looked at stills of the booted scene, including a mid-race crash frame.What it does
go-kart/lap.jsas plain data in and out, andgo-kart/lap.test.mjsasserts each rule. Hold accelerates, letting go brakes. Entering a bend over its safe speed (65 and 58, alternating) crashes the kart wide into the hay for 1 second. Inside a bend the kart's speed is capped at that bend's safe speed. Rivals lap at fixed paces (5.4, 5.9, 6.3 units/s) and are 5% quicker each race. Finishing first to last scores 3, 2, 1, 0.prefers-reduced-motion.shell.js, the rootindex.html<li>, the README games table, the no-music list and the visual-rules line, and a 200 check inserve.test.mjsare all done.bun scripts/og.mjshas been run, soog/go-kart.png, its share tags and a refreshedog/home.pngare included. The page has#muteand no.mp3is committed.Left out
To try it
/go-kart/, hold Space, and lift when the kart nears a board.bun test go-kart/lap.test.mjs.🤖 Generated with Claude Code
Closes #77