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

Migrated from github.com/amirmushichge/pixel-plays

Add Bumper Cars: the playable page and its place in the catalogue, on the rules in `bumper-cars/floor.js` #351

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Bumper Cars is now a playable page at `bumper-cars/` and in the catalogue, built on `floor.js` with no rule changes. The new page tests and `playtest.test.mjs` for the folder pass, as do `serve.test.mjs`, `shell.test.mjs` and `town.test.mjs`. I did not run the full `bun test`.

shipped production is serving it deploy 5b5fb07

opened this

Bumper Cars is now a playable page at bumper-cars/ and in the catalogue, built on floor.js with no rule changes. The new page tests and playtest.test.mjs for the folder pass, as do serve.test.mjs, shell.test.mjs and town.test.mjs. I did not run the full bun test.

I did not check the frame time. tsc printed its help text because there is no tsconfig. scripts/design-lint.ts doesn't exist in this clone, so I did not run it.

What the page does

  • It draws the 9×9 walled floor on the 360×280 engine.js canvas, with hard shadows screen-right.
  • Your car is a blue flat-roofed box with a bar across its front and a flagged pole at the back.
  • The three rivals (red, gold, plum) are round bodies that taper to a pale nose. Shape alone shows each heading.
  • The floor ticks every 0.5 s through step, after a 1.5 s lead-in. Cars slide between squares in 0.2 s.
  • Left/right arrows or A/D steer, as do taps on the left or right half of the canvas. R restarts.
  • The HUD shows score, lives, rivals on the floor and ticks left, all read from the rules state.
  • A shove, a wall shove, a head-on bump, hitting the wall and a blocked shove are announced in the aria-live status. So are each steer, each refusal reason and the end line.
  • The fairground bulbs on the back walls blink and stop under reduced motion. The rules popup is three lines, and there is a #mute button with no .mp3.
  • The status line is announced in the page, but the rules emit no event for a rival hitting the wall, so I could not announce that.

Catalogue

  • shell.js has the entry (id bumper-cars, kind Arcade, input Keys, music: false, forged: true) and index.html has the matching <li>.
  • The README.md Games table has the new row, and the page is in the no-music list and the ambient-motion list. The building comes from town.js automatically.
  • og/bumper-cars.png and og/home.png are regenerated.
  • Arcade is a new kind, so I added it to the kind list in serve.test.mjs and to the comment in shell.js.

Tests

  • rounds.mjs has a scripted round: each tick the bot looks 6 ticks ahead through the rules' own steer and step, and it ends on a win.
  • Its outcome regex requires a win with score above 0. A player who never steers survives all 60 ticks on the bounce-and-turn-right rule, and the idle-twin check in playtest.test.mjs caught that.
  • serve.test.mjs asserts /bumper-cars/ and /bumper-cars/floor.js answer 200. bumper-cars/page.test.mjs is five fast tests.

I rebased on main and resolved conflicts in README.md, index.html, rounds.mjs, serve.test.mjs and og/home.png (regenerated).

I left the ticks running from page load; there is no start-on-first-input.

To try it, open /bumper-cars/ and steer with the arrows or A/D.

🤖 Generated with Claude Code

Closes #345

commented

Bumper Cars is now a playable page at bumper-cars/ and in the catalogue, built on floor.js with no rule changes. The new page tests and playtest.test.mjs for the folder pass, as do serve.test.mjs, shell.test.mjs and town.test.mjs. I did not run the full bun test.

I did not check the frame time. tsc printed its help text because there is no tsconfig. scripts/design-lint.ts doesn't exist in this clone, so I did not run it.

What the page does

  • It draws the 9×9 walled floor on the 360×280 engine.js canvas, with hard shadows screen-right.
  • Your car is a blue flat-roofed box with a bar across its front and a flagged pole at the back.
  • The three rivals (red, gold, plum) are round bodies that taper to a pale nose. Shape alone shows each heading.
  • The floor ticks every 0.5 s through step, after a 1.5 s lead-in. Cars slide between squares in 0.2 s.
  • Left/right arrows or A/D steer, as do taps on the left or right half of the canvas. R restarts.
  • The HUD shows score, lives, rivals on the floor and ticks left, all read from the rules state.
  • A shove, a wall shove, a head-on bump, hitting the wall and a blocked shove are announced in the aria-live status. So are each steer, each refusal reason and the end line.
  • The fairground bulbs on the back walls blink and stop under reduced motion. The rules popup is three lines, and there is a #mute button with no .mp3.
  • The status line is announced in the page, but the rules emit no event for a rival hitting the wall, so I could not announce that.

Catalogue

  • shell.js has the entry (id bumper-cars, kind Arcade, input Keys, music: false, forged: true) and index.html has the matching <li>.
  • The README.md Games table has the new row, and the page is in the no-music list and the ambient-motion list. The building comes from town.js automatically.
  • og/bumper-cars.png and og/home.png are regenerated.
  • Arcade is a new kind, so I added it to the kind list in serve.test.mjs and to the comment in shell.js.

Tests

  • rounds.mjs has a scripted round: each tick the bot looks 6 ticks ahead through the rules' own steer and step, and it ends on a win.
  • Its outcome regex requires a win with score above 0. A player who never steers survives all 60 ticks on the bounce-and-turn-right rule, and the idle-twin check in playtest.test.mjs caught that.
  • serve.test.mjs asserts /bumper-cars/ and /bumper-cars/floor.js answer 200. bumper-cars/page.test.mjs is five fast tests.

I rebased on main and resolved conflicts in README.md, index.html, rounds.mjs, serve.test.mjs and og/home.png (regenerated).

I left the ticks running from page load; there is no start-on-first-input.

To try it, open /bumper-cars/ and steer with the arrows or A/D.

🤖 Generated with Claude Code

commented

No code change this round, so I pushed nothing. I couldn't reproduce the failure.

On the current head (070d31f, already on origin) the full bun test passes here: 1856 tests across 123 files, 0 failures, in 315 s. That includes bumper-cars/floor.test.mjs, bumper-cars/page.test.mjs and all 452 playtests, which pass on their own in 213 s. bun x tsc --noEmit shows no errors. The repo has no scripts/gate.ts and no scripts/fast.ts, so I ran neither.

The log you sent shows only passing playtest lines, cut off at bowls-green. It has no failing test or error. Two things could explain the red deploy:

  • Older push: the deploy may have run on a push from before 070d31f ("Fix the merged serve test block"). That commit fixed a broken merged block in the serve test, and that block passes now.
  • Slow deploy machine: the deploy's bun test has a 600 s limit, and the suite takes about 315 s here. The log stops about a fifth of the way through the playtests, which fits a much slower or heavily loaded deploy machine, but I can't confirm that from the tail.

I did not change timeouts or trim tests on a guess. If the next deploy of this head fails again, the log should show a failing test or a timeout, and I'll fix that.

To check it: open /bumper-cars/ on the preview at https://pixel-plays--351--forge-trevato-apps.open-platform.sh.

Approved — before the latest push

Bumper Cars is reachable (/bumper-cars/ and floor.js answer 200 on the preview), drives the game only through BumperCars, announces shoves, wall shoves, head-on bumps, steers and refusals through the aria-live status, and is in the catalogue, README, shell.js and the root list. Note: I could not open the screenshots (outside my sandbox), so the visual boxes rest on the source. Next two things: (1) the floor ticks from page load after a 1.5 s lead, so a player who opens it on a phone can lose lives before touching it; start the ticks on the first input or on a visible Start. (2) A rival hitting the wall has no event in the rules, so it is silent for screen-reader users; add one in floor.js and announce it.

commented

I merged main into the branch, fixed the three conflicts, and pushed (b854da9).

  • README.md: I kept main's text and added Bumper Cars to the list of games that have no music track. I also kept the sentence about its blinking fairground bulbs, placed beside the other ambient-motion notes.
  • rounds.mjs: Both rows are kept: Bumper Cars' scripted round and Village Darts' round from main.
  • og/home.png: I regenerated it with bun scripts/og.mjs so it shows the merged catalogue, including both new games. No other share card changed.

Only part of the suite ran after the merge, not the full bun test. Those runs passed: serve, shell, town, the Bumper Cars tests, and the playtests for Bumper Cars and Village Darts. The 143 tests across 5 files in the first of those runs include the Bumper Cars tests. The bun x tsc --noEmit check was not re-run for the merge.

Approved — before the latest push

Static page, no inputs beyond key/pointer, status written via textContent, no secrets, no new dependency. Drives the game only through BumperCars, announces shove/wall-shove/head-on/wall/blocked/steer/refusals/end line, tests and scripted round present, catalogue/README/shell/og updated. I could not open the screenshots from my sandbox, so the visual claims rest on the source. Non-blocking: ticks start 1.5 s after load with no start-on-input.

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

I merged main into this branch and pushed it. The full suite passes (1891 tests, 0 failures).

  • Conflicts: README.md, serve.test.mjs and og/home.png conflicted because Pumpkin Patch (#341) landed on main alongside Bumper Cars. I kept both games in the README table and the no-music list, in serve.test.mjs, in the home page list and in shell.js.
  • og/home.png: I regenerated it with bun scripts/og.mjs so the home share card shows both games.
  • Not run: bun x tsc --noEmit only printed its help text, because the repo has no tsconfig, so there was no type check. The repo has no scripts/gate.ts or scripts/fast.ts either.

This pull still adds Bumper Cars, the playable page at bumper-cars/, on the rules in bumper-cars/floor.js. It has a catalogue entry in shell.js and index.html, a README row, a share card, and tests in bumper-cars/page.test.mjs and serve.test.mjs.

To try it, run bun serve.mjs and open /bumper-cars/, or use the preview at https://pixel-plays--351--forge-trevato-apps.open-platform.sh.

🤖 Generated with Claude Code

Approved — before the latest push

Later round: the changes since my last review are merges of main (Pumpkin Patch, Village Darts) with README, rounds.mjs, serve.test.mjs and og/home.png conflicts resolved, and both games kept. I found no new security or correctness issue in the lines that changed. The preview serves /bumper-cars/ and floor.js with 200. I could not open the screenshots, because the sandbox confines file reads to the clone, so the visual boxes rest on the source.

Non-blocking: ticks start 1.5 s after load, so a player can lose lives before touching the page. A start on first input would be kinder. Non-blocking: a rival hitting the wall has no event in floor.js, so it is silent in the aria-live status.

commented

I merged main into this branch, which brought in Tide Crossing (#352), and pushed it. The full suite passes (1903 tests, 0 failures).

  • Conflicts: README.md, index.html, rounds.mjs and og/home.png conflicted. I kept both games everywhere: the README table and the no-music list now read "Pumpkin Patch, Tide Crossing and Bumper Cars", and the ambient-motion paragraph keeps Bumper Cars' blinking bulbs. index.html and the rounds.mjs imports have both games too.
  • og/home.png: I regenerated it with bun scripts/og.mjs so the home share card shows both games.
  • Not run: I didn't run bun x tsc --noEmit this time. The repo has no tsconfig, and last time it only printed its help text.

This pull still adds Bumper Cars, the playable page at bumper-cars/, on the rules in bumper-cars/floor.js. It has a catalogue entry in shell.js and index.html, a README row, a share card, and tests in bumper-cars/page.test.mjs and serve.test.mjs.

To try it, run bun serve.mjs and open /bumper-cars/, or use the preview at https://pixel-plays--351--forge-trevato-apps.open-platform.sh.

🤖 Generated with Claude Code

Approved

Approved. Since my last review the head only merged main (Tide Crossing, Milk Churns) with README, index.html, rounds.mjs and og/home.png conflicts resolved; both games are kept. My earlier asks are met. I could not diff against 070d31f because the clone lacks that commit, so I read the change as listed. The page uses only BumperCars through step and steer. Status is written with textContent, steering and refusals are announced in the aria-live region, keys and both canvas halves work, the cars differ by shape, and reduced motion stops the bulbs. Two things I would do next, both non-blocking: (1) Start the ticks on first input, or give a longer lead-in. Ticks begin 1.5 s after load, so lives can be lost before the player touches the page. (2) floor.js emits no event when a rival hits the wall, so that is silent for screen-reader users. Add the event in the rules and announce it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs