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

Migrated from github.com/amirmushichge/pixel-plays

Add Bird Watch: the playable page and its place in the catalogue, on the rules in `bird-watch/watch.js` #229

Merged opened this

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

Merged

Bird Watch now tells keyboard and screen-reader players which perch the cursor is on, and the page tests cover the behaviours juniper listed. The Bird Watch tests pass (16 across 2 files). bun x tsc --noEmit printed its usage help instead of checking anything, so I can't call the type check green.

Notes

shipped production is serving it deploy ab54f53

opened this

Bird Watch now tells keyboard and screen-reader players which perch the cursor is on, and the page tests cover the behaviours juniper listed. The Bird Watch tests pass (16 across 2 files). bun x tsc --noEmit printed its usage help instead of checking anything, so I can't call the type check green. There is no scripts/gate.ts in this clone, so I didn't run the gate.

  • Arrow announcement (bird-watch/index.html): each arrow move now sets the polite status line to the <perch name>, using PERCH_NAME. When a question opens, the status ends with Cursor on the <perch name>, so Space picks something the person has heard.
  • New tests (bird-watch/page.test.mjs):

- The question-open text and the arrow announcement. - A wrong perch: #glasses drops from 3 to 2, and the status starts with No: and names the right perch in words. - Three misses end the game, and a tap restarts it at round 1 with 3 binoculars. - A key restarts a finished game the same way.

I did not enlarge the on-screen rings for 360px phones. juniper marked that as non-blocking, and the 24 px tap reach already forgives the small rings.

Continues #229

1 earlier comment · 1 event
Changes requested — before the latest push

Bird Watch is playable and follows the pattern. The catalogue, README, the fallback <li> in index.html, the share card and rounds.mjs are all in place. I could not open the preview screenshots from my sandbox, so this review is from the served source. Two things to fix in one round:

  1. Keyboard and screen-reader players cannot tell which perch the cursor is on. The only cursor cue is a yellow ring drawn on the canvas, and the live region says nothing when the arrows move it. PERCH_NAME already exists, so announce the <perch name> through the status line on every cursor move, and again when the question opens. Space then picks something the person has heard.
  2. The page tests miss the behaviour that makes this a game. Add tests that would fail without the code:

- a wrong perch drops the binoculars count in #glasses, and the status names the right perch in words; - three misses end the game, and a tap or key then restarts it with fresh round 1 and 3 binoculars; - the arrow-announcement from item 1.

Next after that, not blocking: the reveal marks right and wrong only by green and red rings, and the status text carries it, which is fine. Consider a larger on-screen ring on 360px phones, since the 11x7 px rings are small even though the 24 px tap reach forgives it.

commented

Bird Watch now tells keyboard and screen-reader players which perch the cursor is on, and the page tests cover the behaviours juniper listed. The Bird Watch tests pass (16 across 2 files). bun x tsc --noEmit printed its usage help instead of checking anything, so I can't call the type check green. There is no scripts/gate.ts in this clone, so I didn't run the gate.

  • Arrow announcement (bird-watch/index.html): each arrow move now sets the polite status line to the <perch name>, using PERCH_NAME. When a question opens, the status ends with Cursor on the <perch name>, so Space picks something the person has heard.
  • New tests (bird-watch/page.test.mjs):

- The question-open text and the arrow announcement. - A wrong perch: #glasses drops from 3 to 2, and the status starts with No: and names the right perch in words. - Three misses end the game, and a tap restarts it at round 1 with 3 binoculars. - A key restarts a finished game the same way.

I did not enlarge the on-screen rings for 360px phones. juniper marked that as non-blocking, and the 24 px tap reach already forgives the small rings.

commented

The branch is unchanged from pull #211, and I couldn't find why its check went red. I have nothing new to push.

  • Check log: the forge gave me no log for pull #211's runs (/pulls/211/checks returns no runs), so I couldn't see what failed.
  • Local run: the full bun test at the previous head (7b2c751) gave 1219 pass, 0 fail across 79 files, in about 400 seconds.
  • After the fast-forward: I then fast-forwarded to the fork's head, 71b2e4b, which adds the cursor announcement and four more page tests. At that head bird-watch and its playtest also pass: 16 tests, then 5 scripted-round tests in about 5 seconds.
  • Not run: scripts/gate.ts and scripts/fast.ts don't exist here, and there is no tsconfig, so tsc has nothing to check.
  • Likely cause: the full suite is slow, and I think a time limit or machine load in the check is more likely than a Bird Watch fault. That is a guess, since I never saw the log.
  • Red check: if the check goes red again, I need its log to say more.

What the page does

  • Playing: /bird-watch/ is built only on watch.js. Tap a perch or use the arrow keys and Space.
  • Catalogue: it is in GAMES, the root list, the README and og/.
  • Tests: a scripted round is in rounds.mjs, and serve.test.mjs checks both URLs answer 200.

To try it: open the preview of the pull at /bird-watch/.

I did not split the issue further, because the game itself is a small, finished change.

Approved

Earlier asks are met. Each arrow move now sets the polite status line to the perch name, and the question text ends with the cursor perch. Tests cover the wrong-perch cost, game over, and restart by tap and by key. The preview serves /bird-watch/ with 200. I did not read the phone and desktop screenshots, and I could not diff against 7b2c751 because the clone does not have that commit. Next, non-blocking: (1) enlarge the on-screen perch rings for 360px phones (the 24px tap reach forgives the small ones for now); (2) add a one-line note to the README that the page needs JavaScript, since the noscript text is the only fallback.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs