Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Add Sandcastle Tide: the playable page and its place in the catalogue, on the rules in `sandcastle/tide.js` #183
Check · Review · Land · Live done — Landed and live in production.
Sandcastle Tide now has its playable page at sandcastle/index.html, and it is in the catalogue. I rebased on main before pushing. After the rebase, serve.test.mjs and shell.test.mjs pass (76), and the five sandcastle tests in playtest.test.mjs pass.
shipped production is serving it deploy ab54f53
Sandcastle Tide now has its playable page at sandcastle/index.html, and it is in the catalogue. I rebased on main before pushing. After the rebase, serve.test.mjs and shell.test.mjs pass (76), and the five sandcastle tests in playtest.test.mjs pass. I did not run the full bun test; the forge runs it on the push.
What changed
- Page: it draws the 9×9 beach, rocks, castle, walls and sea, and calls only
Sandcastle.placeandSandcastle.flood. - Controls: tap a sand square to build a wall, or use the arrow keys and Space. The Tide button or Enter calls the tide.
- Spreading water: the water arrives ring by ring, and input is ignored until it finishes. Under reduced motion the flood applies instantly.
- Look: the 360×280 canvas, 30° camera and screen-right shadows follow the Visual rules. Sand is grainy, water is rippled bands, walls are brick and rocks are smooth grey spheres, so they differ by texture as well as colour.
- Motion and sound: the only ambient motion is the surf line, which is still under
prefers-reduced-motion. There is a#mutebutton, no.mp3, and a three-line rules popup. - HUD: it shows the tide, the walls left, the dry squares and the rules' own status line.
- Catalogue:
GAMESinshell.jshas the entry exactly as specified, with the matching<li>inindex.html. The town building comes fromGAMES, sotown.jsneeded no change. The README has the Games row and the list of games without music.bun scripts/og.mjshas been run:og/sandcastle.pngis new and the home card is regenerated. - Tests:
rounds.mjshas a scripted round that walls the shore row and presses Enter until the game ends.serve.test.mjsasserts/sandcastle/and/sandcastle/tide.jsreturn 200.
Not done
- I added no game rule to the page.
- I did not run
scripts/design-lint.tsorscripts/gate.ts; neither exists in this repository. bun x tsc --noEmitprinted only its usage text, and there is notsconfig.json. That check did not run here.
Try it: open /sandcastle/, tap four sand squares, then press Tide. After a round ends, any tap or key starts a new beach.
Approved. The preview answers 200 at /sandcastle/. It is playable by tap and by keyboard (arrows, Space, Enter) and it sits in the catalogue, the home page list, the README and the share card. It is a static game page with no server surface. The page calls only Sandcastle.place and Sandcastle.flood. Input is ignored while the flood spreads. Reduced motion applies the flood instantly. The status line is aria-live, and the rock/sand/water/wall textures differ by more than colour. serve.test.mjs and the scripted round in rounds.mjs cover it. I did not run bun test myself.
Two things I would do next:
- Make the tide and sound buttons bigger. The padding 10px / margin -10px trick gives about 33px of height, short of a comfortable thumb target on a 360px phone. Use at least 44px of hit area.
- Add a <noscript> line saying the game needs JavaScript, and say the same for the keyboard fallback. With JavaScript off the page is a blank canvas.
Sandcastle Tide now has its playable page at
sandcastle/index.html, and it is in the catalogue. I rebased on main before pushing. After the rebase,serve.test.mjsandshell.test.mjspass (76), and the fivesandcastletests inplaytest.test.mjspass. I did not run the fullbun test; the forge runs it on the push.What changed
Sandcastle.placeandSandcastle.flood.prefers-reduced-motion. There is a#mutebutton, no.mp3, and a three-line rules popup.GAMESinshell.jshas the entry exactly as specified, with the matching<li>inindex.html. The town building comes fromGAMES, sotown.jsneeded no change. The README has the Games row and the list of games without music.bun scripts/og.mjshas been run:og/sandcastle.pngis new and the home card is regenerated.rounds.mjshas a scripted round that walls the shore row and presses Enter until the game ends.serve.test.mjsasserts/sandcastle/and/sandcastle/tide.jsreturn 200.Not done
scripts/design-lint.tsorscripts/gate.ts; neither exists in this repository.bun x tsc --noEmitprinted only its usage text, and there is notsconfig.json. That check did not run here.Try it: open
/sandcastle/, tap four sand squares, then press Tide. After a round ends, any tap or key starts a new beach.Closes #149