Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Add Rain Barrel: the playable page and its place in the catalogue, on the rules in `rain-barrel/gutter.js` #246
Check · Review · Land · Live done — Landed and live in production.
Rain Barrel is now playable at /rain-barrel/ and listed in the catalogue; the branch is pushed on top of current main. The tests below pass.
shipped production is serving it deploy ab54f53
2 earlier comments · 1 event
Rain Barrel is now playable at /rain-barrel/ and listed in the catalogue; the branch is pushed on top of current main. The tests below pass. scripts/gate.ts, scripts/fast.ts and scripts/design-lint.ts don't exist in this clone, and bun x tsc --noEmit printed only its help text because the repo has no tsconfig, so none of those checks ran.
What changed
- The page:
rain-barrel/index.htmldraws the cottage wall with five gutter spouts, the falling drops, the barrel and the yard puddle. It only callsgutter.js(start,move,tick,empty) and adds no game rule of its own. - Controls: tap a spout or press Left/Right to slide the barrel; tap the barrel or press Space/Enter/Down to empty it.
- HUD: it shows ticks left, barrel fill, puddle level and score straight from the rules state, plus the rules' own status line.
- Visual rules:
- The canvas is 360x280 at the fixed camera with hard shadows screen-right, and the puddle limit is a dashed red ring on the yard.
- A full barrel wears a wooden lid with a knob.
- Only the clouds drift ambiently, and they stop under prefers-reduced-motion.
- The canvas aria-label says how to play, the rules popup is four lines, there is a #mute button, and no .mp3 is committed.
- Catalogue: I added the
GAMESentry with exactly the fields from the issue, the matching<li>inindex.html, and the README Games row, no-music list and ambient-motion note. The town building comes fromtown.jslaying outGAMES. I ranbun scripts/og.mjs, soog/rain-barrel.pngandog/home.pngare new. - Tests:
rounds.mjshas a scripted round (the bot slides under the next spout and empties when full) that wins at seed 1 in about 16 s. An untouched game does not reach "Yard dry".serve.test.mjsasserts that/rain-barrel/and/rain-barrel/gutter.jsanswer 200. - Test results:
serve,shellandtowntests, therain-barrelrules tests, and therain-barrelplaytests all pass. I did not run the fullbun test; the forge runs it on the push.
Choices
- A tick lasts 0.5 s with a 0.8 s lead-in before the first drop. That is a presentation choice; the rules count only ticks.
- Emptying resolves its two rain ticks at once. The page restarts the tick timer rather than animating them.
- The scene looks small on the page because the engine's scale is fixed. I did not add a zoom.
- No new dependencies, and nothing in the repository's content asked for anything outside this task.
To try it
Run node serve.mjs and open /rain-barrel/. Keep the puddle under the red ring for the 40 ticks.
🤖 Generated with Claude Code
Playable and served (200 on /rain-barrel/ and /rain-barrel/gutter.js in the preview), catalogue, README, og cards, rounds and serve test are all in place. One change to make before it lands:
- Fix first: the status line is a polite live region that is rewritten every 0.5 s.
P.lineis 'Tick N of 40: barrel ..., puddle ..., N points' and changes each tick, so a screen reader is told a new sentence twice a second for the whole round and cannot hear anything else. Droparia-livefrom the per-tick text. Keep it only for the events (notes such as 'Barrel tipped out', the end line, 'the puddle floods'), for example by writing those to a separaterole=statuselement and keeping the per-tick line as plain text.
Smaller, same round if easy: the 'of 4 in the barrel' and 'of 8 in the puddle' labels are hard-coded in the HTML; set them from P.capacity and P.limit so the HUD cannot drift from the rules.
No other box misses were found; once the live region is fixed the boxes below are met.
Both of juniper's points are fixed on the same branch and pushed. serve.test.mjs (74 tests) and the rain-barrel playtests (6) pass; I did not run the full bun test.
- Live region: the per-tick line (
P.line, "Tick N of 40: …") now goes into a plain#linediv with no live role. Only#status(role=status,aria-live=polite) is announced, and it carries event notes such as "Barrel tipped out" and the end line.#statusis cleared when a note expires. The end line still matches the scripted round's outcome. - HUD labels:
renderHudnow sets "of N in the barrel" and "of N in the puddle" fromP.capacityandP.limit. - Share cards: I re-ran
bun scripts/og.mjs; the cards came out unchanged. - Disagreements: none.
I did not add a separate announcement for the puddle flooding, because the end line already says "Yard flooded: … puddle reached 8".
I merged main into this branch and pushed. The merge now applies cleanly, and the forge's check will run on the push.
Conflicts. Rain Barrel and Patchwork Quilt were each added to the same lists in README.md, index.html, shell.js and serve.test.mjs. I kept both in every one. In the README's "Add a game" sentence about games without a music track, the list now reads "Bunting, Patchwork Quilt and Rain Barrel". The reduced-motion line now names both Patchwork Quilt's curtain and Rain Barrel's clouds. In serve.test.mjs both games keep their own "served without a track" test.
og/home.png. This is a binary file, so I didn't merge it by hand. I re-ran bun scripts/og.mjs, which regenerated every card and tag, including the home grid with both games.
Tests. bun test passes on serve.test.mjs, the shell tests, the Rain Barrel and Quilt tests, and playtest.test.mjs: 479 tests in all, none failing. I did not run the full suite, so the forge's check is its first run. There is no scripts/gate.ts here. bun x tsc --noEmit printed only tsc's help text, so I have no type-check result to report.
Both earlier asks are met: the per-tick line is a plain div and only #status is a live region, and the HUD labels come from P.capacity and P.limit. The preview serves /rain-barrel/ with 200. Next: (1) Non-blocking: announce the flood in the live region the moment the puddle hits the line, not only in the end line. (2) Non-blocking: add a visible focus ring on the canvas, which currently has outline:none.
Rain Barrel is now playable at
/rain-barrel/and listed in the catalogue; the branch is pushed on top of currentmain. The tests below pass.scripts/gate.ts,scripts/fast.tsandscripts/design-lint.tsdon't exist in this clone, andbun x tsc --noEmitprinted only its help text because the repo has no tsconfig, so none of those checks ran.What changed
rain-barrel/index.htmldraws the cottage wall with five gutter spouts, the falling drops, the barrel and the yard puddle. It only callsgutter.js(start,move,tick,empty) and adds no game rule of its own.- The canvas is 360x280 at the fixed camera with hard shadows screen-right, and the puddle limit is a dashed red ring on the yard. - A full barrel wears a wooden lid with a knob. - Only the clouds drift ambiently, and they stop under
prefers-reduced-motion. - The canvas aria-label says how to play, the rules popup is four lines, there is a#mutebutton, and no.mp3is committed.GAMESentry with exactly the fields from the issue, the matching<li>inindex.html, and the README Games row, no-music list and ambient-motion note. The town building comes fromtown.jslaying outGAMES. I ranbun scripts/og.mjs, soog/rain-barrel.pngandog/home.pngare new.rounds.mjshas a scripted round (the bot slides under the next spout and empties when full) that wins at seed 1 in about 16 s. An untouched game does not reach "Yard dry".serve.test.mjsasserts that/rain-barrel/and/rain-barrel/gutter.jsanswer 200.serve,shellandtowntests, therain-barrelrules tests, and therain-barrelplaytests all pass. I did not run the fullbun test; the forge runs it on the push.Choices
To try it Run
node serve.mjsand open/rain-barrel/. Keep the puddle under the red ring for the 40 ticks.🤖 Generated with Claude Code
Closes #220