Public: anyone can read this; the crew can change it.

Migrated from github.com/amirmushichge/pixel-plays

Add Carousel: the playable page and its place in the catalogue, on the rules in `carousel/ride.js` #215

Parked opened this
Closed without merging

Carousel is now a playable page at /carousel/, driven only through carousel/ride.js, and the branch is pushed. The playtest, serve.test.mjs, shell.test.mjs and town.test.mjs suites pass. I did not run the full bun test, and bun x tsc --noEmit printed only tsc's usage text because the repo has no tsconfig.

Notes

stopped parked by the crew deploy c16ea63

opened this

Carousel is now a playable page at /carousel/, driven only through carousel/ride.js, and the branch is pushed. The playtest, serve.test.mjs, shell.test.mjs and town.test.mjs suites pass. I did not run the full bun test, and bun x tsc --noEmit printed only tsc's usage text because the repo has no tsconfig. scripts/design-lint.ts, scripts/gate.ts and scripts/fast.ts don't exist in this clone, so none of them ran.

What's in it

  • Page: carousel/index.html is the 360x280 canvas with eight horses that rise and fall, a rider on one, and the ring dispenser at the front with the next ring showing. Tap anywhere or press Space or Enter to grab, once a turn. The HUD shows turns left, rings taken and score out of 14.
  • Rings and window: Brass rings are hollow bands and iron rings are solid discs. The grab window is a marked arc on the platform, with a brighter centre for the bonus. The rings after the next one wait on the dispenser post, and the rings taken so far line the bottom of the canvas.
  • Rules and ambient motion: The rules popup is four lines, and there is a #mute button with no .mp3. Only the canopy lights blink, and under prefers-reduced-motion they stay lit.
  • Catalogue: shell.js has the GAMES entry as specified and index.html has the matching <li>. The README has the Games row, the no-music list entry and the ambient-motion note. The town building comes from GAMES automatically, so town.js needed no edit. bun scripts/og.mjs was run (og/carousel.png, og/home.png).
  • Tests: rounds.mjs has a scripted round for carousel that grabs at the dispenser each turn and reaches the end line. Its outcome regex requires at least one ring, so an untouched ride doesn't match it. serve.test.mjs asserts /carousel/ and /carousel/ride.js answer 200.

Look at: the dispenser post stands slightly right of the rider's path, with an arm reaching in, so the platform arc stays visible. The rings look small at the engine's scale. The branch was already up to date with origin/main when I pushed, so no rebase was needed.

Untracked dotfiles such as .bashrc and .mcp.json sit in the clone root. They aren't mine and I left them out of the commit.

Closes #188

3 earlier comments
commented

Carousel is now a playable page at /carousel/, driven only through carousel/ride.js, and the branch is pushed. The playtest, serve.test.mjs, shell.test.mjs and town.test.mjs suites pass. I did not run the full bun test, and bun x tsc --noEmit printed only tsc's usage text because the repo has no tsconfig. scripts/design-lint.ts, scripts/gate.ts and scripts/fast.ts don't exist in this clone, so none of them ran.

What's in it

  • Page: carousel/index.html is the 360x280 canvas with eight horses that rise and fall, a rider on one, and the ring dispenser at the front with the next ring showing. Tap anywhere or press Space or Enter to grab, once a turn. The HUD shows turns left, rings taken and score out of 14.
  • Rings and window: Brass rings are hollow bands and iron rings are solid discs. The grab window is a marked arc on the platform, with a brighter centre for the bonus. The rings after the next one wait on the dispenser post, and the rings taken so far line the bottom of the canvas.
  • Rules and ambient motion: The rules popup is four lines, and there is a #mute button with no .mp3. Only the canopy lights blink, and under prefers-reduced-motion they stay lit.
  • Catalogue: shell.js has the GAMES entry as specified and index.html has the matching <li>. The README has the Games row, the no-music list entry and the ambient-motion note. The town building comes from GAMES automatically, so town.js needed no edit. bun scripts/og.mjs was run (og/carousel.png, og/home.png).
  • Tests: rounds.mjs has a scripted round for carousel that grabs at the dispenser each turn and reaches the end line. Its outcome regex requires at least one ring, so an untouched ride doesn't match it. serve.test.mjs asserts /carousel/ and /carousel/ride.js answer 200.

Look at: the dispenser post stands slightly right of the rider's path, with an arm reaching in, so the platform arc stays visible. The rings look small at the engine's scale. The branch was already up to date with origin/main when I pushed, so no rebase was needed.

Untracked dotfiles such as .bashrc and .mcp.json sit in the clone root. They aren't mine and I left them out of the commit.

commented

This pull adds the Carousel page. Its Carousel tests were never the problem: they pass, and the page boots, idles and plays its round correctly. The preview's test step failed only because the whole suite ran one file after another and went over the 600 s limit. That suite is now split across parallel processes.

What changed

  • scripts/test.mjs is new and runs the suite in parallel.

- One process runs every test file except playtest.test.mjs. - One runs the playtest roster checks. - Six more run the playtest games, dealt out by game.

  • forge.json now runs bun scripts/test.mjs instead of bun test. All 1,216 tests ran across those processes and passed, in 2 m 55 s on this machine. The old serial run of playtest.test.mjs alone took over 300 s here, so the full suite had no room left under the 600 s limit.

What I chose not to do

  • I did not trim or skip any playtest. Every game is still booted and played in full.
  • I did not touch the Carousel code.

How to try it

  • Run bun scripts/test.mjs. It exits non-zero if any shard fails and prints each shard's log.
  • bun test still works for a single file.

Not run

  • scripts/gate.ts and scripts/fast.ts don't exist in this repository.
  • I did not run bun x tsc --noEmit; the repository has no TypeScript config and this change is plain JS.
  • I did not run the design lint, since nothing in src/web/ changed.
commented

scripts/test.mjs now runs the test shards two at a time instead of all at once, to stay under the forge's 2-core cap. The new push is unchecked and the margin on the 600 s limit is thin.

The earlier version started 8 bun test processes together, which is what used 6.1 cores. It now runs two at a time and starts the next job as each one finishes.

I measured it pinned to 2 cores with taskset: 1,216 tests passed in 9 m 25 s. That is under 600 s, but only just, and the machine was shared while I ran it. The total CPU work is about 11 m 40 s, so the best case on two cores is roughly 6 minutes. Most of that work is playtest.test.mjs, which boots and plays every game.

I haven't cut any tests. If the forge still times out, the next step is to make the playtests themselves cheaper, for example by playing each game's round once instead of twice. That is a decision for you, so I left it alone.

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