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 #88

Parked opened this
Closed without merging

All three review points are fixed and pushed. The Go-Kart and serve.test.mjs tests pass (62 tests) and tsc is clean. I did not run bun scripts/design-lint.ts: the script isn't in this clone.

Notes

stopped parked by the crew deploy 3be3c89

opened this

All three review points are fixed and pushed. The Go-Kart and serve.test.mjs tests pass (62 tests) and tsc is clean. I did not run bun scripts/design-lint.ts: the script isn't in this clone. I also did not run the bell-tower suite or the rest of the full suite; the forge's check does that on push.

  • Bell-tower timeout: I reverted bell-tower/page.test.mjs to match main. Go-Kart Fete doesn't need the longer timeout. The slow test only mattered because I had touched it in an earlier round while the suite was loaded, and the pull no longer includes it.
  • README source: The Go-Kart Fete row now says "the concept is ordinary kart racing, with no particular game as its source", the same wording Goalkeeper uses. I know of no specific source game, so there is none to credit.
  • go-kart/index.html: The spectator heading expression is now three named constants: FACE_ACROSS, FACE_NEAR_BANK and FACE_FAR_BANK. They produce the same angles as before. FLAG_LIGHT, FLAG_DARK and DRIVERS now sit with the other palette constants, above flag() and draw().
  • go-kart/lap.js: rankOf is no longer exported. It is still used inside the module.

Continues #88

Show 2 earlier items

7 earlier comments
commented

Go-Kart Fete is already built on this branch. The only change this run is a longer timeout on the card-render test in serve.test.mjs, which I think is why the check went red twice.

What the game is: go-kart/index.html and go-kart/lap.js hold the three-race, hay-bale-oval game. go-kart/lap.test.mjs asserts each rule from the issue, including the win and loss line at 6. The game is listed in shell.js, the root index.html, and the README. og/go-kart.png exists, and serve.test.mjs checks the two /go-kart/ routes.

What went wrong: the test "every committed card is what the games render now, and capture is deterministic" took about 26 s here against a 60 s limit. It renders every game twice, so it grows with each game added. It failed once in the full run (it timed out under load) and passed when I re-ran it alone. I couldn't see the forge's check log, so the timeout is my best reading, not a confirmed cause.

The fix: I raised that test's timeout from 60 s to 240 s in serve.test.mjs. Nothing about the game changed. I also left the other tests alone, since the only other slow one is playtest.test.mjs (about 229 s for the file) and its per-test limit is a separate 60 s.

Checks:

  • The branch was already up to date with main.
  • The full bun test run passed 581 of 581 here before the timeout change. I did not re-run the whole suite after the change.
  • bun x tsc --noEmit printed only its usage text, so I can't call it clean. The repo has no tsconfig.json and the script isn't part of the check.
  • I did not run bun scripts/gate.ts or bun scripts/design-lint.ts, and I did not look at the running game.

What I chose not to do: I didn't make the og test cheaper by rendering each game once, because the double render is what checks that capture is deterministic. If the check is still red, the next step is to split that test per game.

To try it: open the pull's preview and go to /go-kart/. Hold Space, Up, or the canvas to race, and let go before each bend marked by a speed board.

🤖 Generated with Claude Code

commented

Nothing new on issue #77 since my last run, so I changed nothing and pushed nothing. The branch already holds everything from last time.

  • Branch state: it matches origin and is up to date with main. The last commit is the longer timeout for the card-render test in serve.test.mjs (60 s to 240 s).
  • Pull: I haven't confirmed the check passes on that timeout fix. The pulls listing I fetched was cut off before showing any pull for this branch. The only comment on #77 is the old "parked" note, from before the fix.
  • Game: Go-Kart Fete itself is unchanged. The full suite passed here before the timeout change, but I didn't re-run it afterwards.
  • If the check is still red: I need its log. The likely next step is to split the card-render test so each game renders in its own test.
commented

Nothing has changed since my last run, so I made no changes and pushed nothing.

  • Branch: it matches origin, is up to date with main, and ends at 2d7b9a6, the longer timeout for the card-render test.
  • Pull: #88 is open for this branch. I can't see its check result from here, and the issue has no new comments beyond the earlier "parked" note.
  • Next step: if #88's check is red, I need its log to fix anything further. The likely next step is to split the card-render test so each game renders in its own test.
commented

I merged main into the branch and pushed it. serve.test.mjs was the only conflict.

  • The conflict: both sides had added a test at the same spot. main added a check that every game page turns off text selection and the iOS touch callout. This branch added the Go-Kart Fete served-page test. I kept both tests.
  • One extra change: the new main test requires every game page to carry those CSS rules, and go-kart/index.html didn't have them. I added the same html, body rule that Soapbox Derby uses.
  • Tests: serve.test.mjs passes (46 tests) and the Go-Kart rules suite passes (17 tests). I didn't run tsc, scripts/gate.ts, scripts/design-lint.ts or the rest of the suite here. The forge runs the full check on the push.
commented

The preview deploy failed because the Go-Kart Fete game had no scripted round in rounds.mjs, so its playtest crashed with "Cannot destructure property 'over' from null". The playtest also checks the other games that lacked one.

I committed and pushed the missing scripted rounds for go-kart, espresso-bar, signal-box and soapbox-derby. They had been sitting uncommitted in the working tree.

  • go-kart round: holds the throttle and lifts early enough to take each bend at its safe speed. It taps to start the next race and ends on "race again". The HUD must show the place and points line, "you win the fete" or "not this time".
  • Tests: all 34 "scripted round" playtests pass locally, and bun x tsc --noEmit is clean. I ran only the playtest file, not the full suite. The forge runs the full check on the push.
  • Not run: this clone has no scripts/gate.ts or scripts/fast.ts, so I ran neither.

To try it, open the Go-Kart Fete game from the feed on the pull's preview. Hold space to drive and let go before each bend.

🤖 Generated with Claude Code

commented

Go-Kart Fete is on the branch and pushed. The forge's check hasn't run against this push yet, so nothing has confirmed the earlier red check is fixed.

What was wrong. The playtest had no scripted round for go-kart, so it crashed with "Cannot destructure property 'over' from null". That is what kept the check red.

What changed.

  • The game, with all the rules in go-kart/lap.js and a test for each in go-kart/lap.test.mjs.
  • Its entry in GAMES in shell.js, the matching <li> in index.html, and the README Games table row.
  • The /go-kart/ and /go-kart/lap.js assertions in serve.test.mjs.
  • og/go-kart.png.
  • rounds.mjs gained a go-kart round: hold the throttle, lift early enough to meet each bend at its safe speed, and tap between races. I also added rounds for espresso-bar, signal-box and soapbox-derby, which had none. This is the fix for the crash.

Tests. serve.test.mjs, shell.test.mjs, playtest.test.mjs and the go-kart tests pass: 236 tests, 0 failures. bun x tsc --noEmit printed only tsc's compiler-options help text and no type errors, so the type check gave no usable result. This clone has no scripts/gate.ts, scripts/design-lint.ts or package.json, so I could not run the gate, the design lint or bun install. I did not run the full suite.

What I didn't do. I didn't touch the other new-game pulls (#57, #61, #66, #68, #72, #73, #74). My additions to shell.js, index.html and the README are single appended lines, so rebasing on main should be quick.

Two things to check.

  • The latest commit, 3be3c89, was made by the forge. Its message is a long sentence about the preview failure, and it records zero-byte dotfiles like .bashrc and .claude/*. I left it alone.
  • The playtest suite is slow: about 5 minutes here for these four files.

To try it. Open /go-kart/, then hold Space or Up, or press and hold the canvas, to accelerate. Let go before each marker board to slow for the bend. Three races of three laps; 6 points or more wins.

commented

Pull #88 is open for this branch. I made no changes this run, because nothing on main or on the issue has changed since my last push.

  • Branch state: quill/77-add-go-kart-fete-three-laps-of-a-hay-bal contains everything on main, and its last push is 3be3c89. Nothing is waiting to be committed or pushed.
  • Issue and conversation: the issue has no new comments since my last run.
  • Other open pulls: #87, #90 and #93 are open. None of them is on main yet, so there was nothing new to rebase onto.
  • Tests: the last local run of the go-kart, playtest, serve and shell tests was green (236 pass, 0 fail). I did not re-run them, since no code changed.
  • Check on the push: I did not look up the check result for 3be3c89, so I don't know whether the earlier red check is now green.

The scope and the things I left out are as in my previous description:

  • What it adds: the game itself (go-kart/index.html, go-kart/lap.js, go-kart/lap.test.mjs) and its shell.js, index.html and README entries. It also adds the serve.test.mjs assertions for /go-kart/ and /go-kart/lap.js, and og/go-kart.png.
  • The fix: the playtest was crashing because go-kart had no scripted round. rounds.mjs now has one (hold, lift for each bend, tap between races). I also added rounds for espresso-bar, signal-box and soapbox-derby, which had none.
  • Not touched: the other new-game pulls.
  • Not run: scripts/gate.ts and scripts/design-lint.ts don't exist in this clone, and bun x tsc --noEmit gave no usable result. The playtest files take about five minutes.
  • To try it: open /go-kart/ on the preview at https://pixel-plays--88--forge-trevato-apps.open-platform.sh. Hold Space or Up, or press and hold the canvas, to accelerate. Let go before each marker board to slow for the bend. It is three races of three laps, and 6 points or more wins.
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