Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Add Soapbox Derby: steer a wooden cart down a cobbled hill between the hay bales #78
Soapbox Derby is added and pushed. The cart rolls down a 360 m cobbled street between gates of hay bales and finishes under a chequered banner. The new unit and page tests, the Soapbox Derby playtests, serve.test.mjs and shell.test.mjs pass.
stopped parked by the crew deploy 36c9fb7
3 earlier comments
Soapbox Derby is added and pushed. The cart rolls down a 360 m cobbled street between gates of hay bales and finishes under a chequered banner. The new unit and page tests, the Soapbox Derby playtests, serve.test.mjs and shell.test.mjs pass. I did not run the whole bun test suite, only the files above. The look is only checked from the generated share card (the opening frame), not in a browser. There is no scripts/gate.ts or scripts/fast.ts in this clone. bun x tsc --noEmit has no tsconfig here, so it only printed its help text.
What changed
- Rules:
soapbox-derby/cart.jsholds all the rules, with plain data in and out. Gravity speeds the cart up to 18 m/s. Steering is a first-order lag of 0.35 s, so the cart answers late. A bale keeps 35% of the speed, costs a life and gives 1 s of immunity so one bale can't cost twice. A flagstone strip gives 1.5 s of extra push and a higher top speed. Gate gaps narrow in a straight line from 3.4 m to 1.7 m, alternating left and right from a seeded roll. Three lives gone ends the run as lost, and reaching 360 m ends it as won with the time and best time. - Tests:
soapbox-derby/cart.test.mjscovers each rule in the issue, plus that every gap fits the street and that a steady driver can win in 15–40 s.soapbox-derby/page.test.mjsboots the real page and checks that drag and the arrow keys steer and the HUD updates. - Page:
soapbox-derby/index.htmluses the 360x280 canvas and fixed camera of Tram Line. The ground is baked into 8 scroll phases and bales and the banner are recorded once and shifted in whole pixels, so the per-frame cost is small. Only the cart is drawn each frame. The bunting is the one ambient motion, 8 fps, and it holds still underprefers-reduced-motion. - HUD and controls: The HUD shows time, metres to go, lives and best time (kept in localStorage). Drag anywhere on the canvas steers, and 100 canvas pixels is full lock. Left/right arrows (also A/D) steer too. The canvas aria-label says how to play, and the rules popup is three lines.
#muteis there and there is no.mp3. - Listing:
shell.jshas the exactGAMESentry from the issue, with matchingindex.html<li>, README Games row and the README list of games without music.og/soapbox-derby.png,og/home.pngand the share tags came frombun scripts/og.mjs.serve.test.mjsasserts/soapbox-derby/and/soapbox-derby/cart.jsanswer 200.
Left as it is
- Steering holds where you leave it after you release a drag or a key, instead of re-centring.
- Hitting a kerb bale costs nothing. The kerb bales are scenery and the cart is clamped inside the street.
- The share card shows the opening frame, so no gate is in view yet.
- No dependencies were added.
Try it
- Run
bun serve.mjsand open/soapbox-derby/. - Drag or use the arrow keys.
- Steer early toward the gap in each gate, and aim for the flagstone strips between gates.
- Merging means a one-line rebase against the other new-game pulls in
shell.js,index.html,README.mdandserve.test.mjs.
🤖 Generated with Claude Code
I merged main into the branch, resolved the conflicts and pushed it (bb8e539). It should merge cleanly again, though I haven't re-checked the pull itself.
- README.md, index.html, shell.js:
mainadded Goalkeeper in the same spots as my Soapbox Derby lines, so I kept both entries. Goalkeeper comes first and Soapbox Derby follows. - No-music list: the README sentence now reads "…Bell Tower, Goalkeeper and Soapbox Derby play on their own sound effects".
- og/home.png: this is a binary file and could not be merged. I took
main's copy, then re-ranbun scripts/og.mjs, which rebuilt it with every card, Goalkeeper and Soapbox Derby included.og/soapbox-derby.pngand its share tags are unchanged.
I ran serve.test.mjs, shell.test.mjs and the Soapbox Derby tests, and all 61 pass. I did not re-run the full playtest suite, so Goalkeeper's own tests are untested on the merged branch. The forge's check will run those.
I merged main into the Soapbox Derby branch and pushed it. The full suite passes locally: 518 tests, 0 failures. I did not run bun x tsc --noEmit or the design lint for this merge.
Two files conflicted:
README.md: I keptmain's version of the no-music list and put Soapbox Derby back in it, next to Wood Split. The list now ends "Goalkeeper, Wood Split and Soapbox Derby play on their own sound effects".og/home.png: a binary file can't be merged by hand. I tookmain's copy and re-ranbun scripts/og.mjs, so the home collage includes both Wood Split and Soapbox Derby.serve.test.mjschecks that collage byte for byte, and it passes.
The merge commit is 36c9fb7.
Closed by the crew: main moved under it 2 times and the branch could not be brought up to date. Conflicting files: README.md, og/home.png, serve.test.mjs.
Soapbox Derby is added and pushed. The cart rolls down a 360 m cobbled street between gates of hay bales and finishes under a chequered banner. The new unit and page tests, the Soapbox Derby playtests,
serve.test.mjsandshell.test.mjspass. I did not run the wholebun testsuite, only the files above. The look is only checked from the generated share card (the opening frame), not in a browser. There is noscripts/gate.tsorscripts/fast.tsin this clone.bun x tsc --noEmithas no tsconfig here, so it only printed its help text.What changed
soapbox-derby/cart.jsholds all the rules, with plain data in and out. Gravity speeds the cart up to 18 m/s. Steering is a first-order lag of 0.35 s, so the cart answers late. A bale keeps 35% of the speed, costs a life and gives 1 s of immunity so one bale can't cost twice. A flagstone strip gives 1.5 s of extra push and a higher top speed. Gate gaps narrow in a straight line from 3.4 m to 1.7 m, alternating left and right from a seeded roll. Three lives gone ends the run as lost, and reaching 360 m ends it as won with the time and best time.soapbox-derby/cart.test.mjscovers each rule in the issue, plus that every gap fits the street and that a steady driver can win in 15–40 s.soapbox-derby/page.test.mjsboots the real page and checks that drag and the arrow keys steer and the HUD updates.soapbox-derby/index.htmluses the 360x280 canvas and fixed camera of Tram Line. The ground is baked into 8 scroll phases and bales and the banner are recorded once and shifted in whole pixels, so the per-frame cost is small. Only the cart is drawn each frame. The bunting is the one ambient motion, 8 fps, and it holds still underprefers-reduced-motion.#muteis there and there is no.mp3.shell.jshas the exactGAMESentry from the issue, with matchingindex.html<li>, README Games row and the README list of games without music.og/soapbox-derby.png,og/home.pngand the share tags came frombun scripts/og.mjs.serve.test.mjsasserts/soapbox-derby/and/soapbox-derby/cart.jsanswer 200.Left as it is
Try it
bun serve.mjsand open/soapbox-derby/.shell.js,index.html,README.mdandserve.test.mjs.🤖 Generated with Claude Code
Closes #66