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

Migrated from github.com/amirmushichge/pixel-plays

Add Apple Bobbing: the playable page and its place in the catalogue, on the rules in `apple-bobbing/tub.js` #365

Merged opened this

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

Merged

Apple Bobbing is now playable at `/apple-bobbing/` and listed in the catalogue. The `serve`, `shell`, `plaza`, playtest and page tests pass here, but I didn't run the whole suite; the forge runs it on push.

shipped production is serving it deploy 5b5fb07

opened this

Apple Bobbing is now playable at /apple-bobbing/ and listed in the catalogue. The serve, shell, plaza, playtest and page tests pass here, but I didn't run the whole suite; the forge runs it on push.

What changed

  • Page: apple-bobbing/index.html draws a fete water tub with five apples bobbing at the heights offset gives. step advances them on a half-second clock.
  • Controls: Tap an apple, or use the arrow keys (or A/D, W/S), to aim. Tap it again, or press Space or Enter, to dunk. Keys 1–5 aim directly and R starts a fresh seed.
  • Rules: The page calls only start, step, aim, dunk and offset, and adds no rule of its own.
  • HUD: It shows score, apples caught, breaths and ticks left. Every aim, dunk, refusal and end line goes to the aria-live region.
  • Visuals: The aimed apple has a ring on the water. An apple at the top of its bob has a sparkle above it. Caught apples move to a row on the lawn. Water ripples are the only ambient motion and stop under prefers-reduced-motion. The bobbing is play and still moves.
  • Page requirements: The canvas aria-label says how to play, the rules popup is three lines, there is a #mute button and no .mp3.
  • Catalogue: GAMES in shell.js has the entry (Timing, Tap, music: false, forged: true), with the matching <li> in index.html. The README has the Games-table row, the no-music list and the ambient-motion list. bun scripts/og.mjs has been run, which added og/apple-bobbing.png and refreshed og/home.png.
  • Tests: rounds.mjs has a scripted round that aims the apple whose top comes soonest, dunks on that tick, and wins. serve.test.mjs asserts /apple-bobbing/ and /apple-bobbing/tub.js return 200. apple-bobbing/page.test.mjs has five tests, covering the HUD and clock, aim/dunk/refusal announcements, scoring, the ring and sparkle, and the end line with restart.

Choices to know about

  • A tap on empty water only shows a hint and does not dunk, so a stray tap on a phone can't cost a breath.
  • Not run: bun scripts/design-lint.ts doesn't exist in this clone (module not found). bun x tsc --noEmit printed only its help text, and there is no tsconfig, so neither was a real check. The clone has no docs/VISION.md or AGENTS.md, so I followed the bumper-cars page shape.
  • Branch was already up to date with main when I pushed.

Try it: bun serve.mjs, open /apple-bobbing/, press → to aim, then Space when the sparkle shows.

🤖 Generated with Claude Code

Closes #360

commented

Apple Bobbing is now playable at /apple-bobbing/ and listed in the catalogue. The serve, shell, plaza, playtest and page tests pass here, but I didn't run the whole suite; the forge runs it on push.

What changed

  • Page: apple-bobbing/index.html draws a fete water tub with five apples bobbing at the heights offset gives. step advances them on a half-second clock.
  • Controls: Tap an apple, or use the arrow keys (or A/D, W/S), to aim. Tap it again, or press Space or Enter, to dunk. Keys 1–5 aim directly and R starts a fresh seed.
  • Rules: The page calls only start, step, aim, dunk and offset, and adds no rule of its own.
  • HUD: It shows score, apples caught, breaths and ticks left. Every aim, dunk, refusal and end line goes to the aria-live region.
  • Visuals: The aimed apple has a ring on the water. An apple at the top of its bob has a sparkle above it. Caught apples move to a row on the lawn. Water ripples are the only ambient motion and stop under prefers-reduced-motion. The bobbing is play and still moves.
  • Page requirements: The canvas aria-label says how to play, the rules popup is three lines, there is a #mute button and no .mp3.
  • Catalogue: GAMES in shell.js has the entry (Timing, Tap, music: false, forged: true), with the matching <li> in index.html. The README has the Games-table row, the no-music list and the ambient-motion list. bun scripts/og.mjs has been run, which added og/apple-bobbing.png and refreshed og/home.png.
  • Tests: rounds.mjs has a scripted round that aims the apple whose top comes soonest, dunks on that tick, and wins. serve.test.mjs asserts /apple-bobbing/ and /apple-bobbing/tub.js return 200. apple-bobbing/page.test.mjs has five tests, covering the HUD and clock, aim/dunk/refusal announcements, scoring, the ring and sparkle, and the end line with restart.

Choices to know about

  • A tap on empty water only shows a hint and does not dunk, so a stray tap on a phone can't cost a breath.
  • Not run: bun scripts/design-lint.ts doesn't exist in this clone (module not found). bun x tsc --noEmit printed only its help text, and there is no tsconfig, so neither was a real check. The clone has no docs/VISION.md or AGENTS.md, so I followed the bumper-cars page shape.
  • Branch was already up to date with main when I pushed.

Try it: bun serve.mjs, open /apple-bobbing/, press → to aim, then Space when the sparkle shows.

🤖 Generated with Claude Code

Approved

Apple Bobbing is playable at /apple-bobbing/ (200 on the preview) and listed everywhere the catalogue needs it. The page drives the game only through tub.js, announces aim, dunk, refusals and the end line through the live region, and marks the aimed apple with a ring and the top-of-bob apple with a sparkle, so neither relies on colour. Ambient ripples stop under reduced motion. A stray tap on empty water costs nothing, which is right for a thumb. Two things I would do next: (1) show the next tick's countdown or a visible beat so a keyboard or screen-reader player can anticipate the top without watching the sparkle; (2) have the live region announce when the aimed apple reaches the top, since that is the moment a non-visual player needs. I did not run design-lint (the script is absent from this clone) and I did not finish a local run of the page tests, so I rely on the green check for those.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs