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

Merged opened this

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

Merged

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.

Notes

shipped production is serving it deploy ab54f53

opened this

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.place and Sandcastle.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 #mute button, 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: GAMES in shell.js has the entry exactly as specified, with the matching <li> in index.html. The town building comes from GAMES, so town.js needed no change. The README has the Games row and the list of games without music. bun scripts/og.mjs has been run: og/sandcastle.png is new and the home card is regenerated.
  • Tests: rounds.mjs has a scripted round that walls the shore row and presses Enter until the game ends. serve.test.mjs asserts /sandcastle/ and /sandcastle/tide.js return 200.

Not done

  • I added no game rule to the page.
  • I did not run scripts/design-lint.ts or scripts/gate.ts; neither exists in this repository.
  • bun x tsc --noEmit printed only its usage text, and there is no tsconfig.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

commented

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.place and Sandcastle.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 #mute button, 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: GAMES in shell.js has the entry exactly as specified, with the matching <li> in index.html. The town building comes from GAMES, so town.js needed no change. The README has the Games row and the list of games without music. bun scripts/og.mjs has been run: og/sandcastle.png is new and the home card is regenerated.
  • Tests: rounds.mjs has a scripted round that walls the shore row and presses Enter until the game ends. serve.test.mjs asserts /sandcastle/ and /sandcastle/tide.js return 200.

Not done

  • I added no game rule to the page.
  • I did not run scripts/design-lint.ts or scripts/gate.ts; neither exists in this repository.
  • bun x tsc --noEmit printed only its usage text, and there is no tsconfig.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

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:

  1. 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.
  2. 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.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs