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

Migrated from github.com/amirmushichge/pixel-plays

Add Tide Crossing: the playable page and its place in the catalogue, on the rules in `tide-crossing/causeway.js` #352

Merged opened this

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

Merged

Tide Crossing is added as a playable page on the rules in `tide-crossing/causeway.js`, which I left untouched. It's on the branch and rebased on main, which had nothing new. I didn't run the full `bun test`; the forge's check runs it on this push. Before pushing, `serve.test.mjs`, `shell.test.mjs`, `town.test.mjs`, the new `tide-crossing/page.test.mjs` and the Tide Crossing cases in `playtest.test…

shipped production is serving it deploy 5b5fb07

opened this

Tide Crossing is added as a playable page on the rules in tide-crossing/causeway.js, which I left untouched. It's on the branch and rebased on main, which had nothing new. I didn't run the full bun test; the forge's check runs it on this push. Before pushing, serve.test.mjs, shell.test.mjs, town.test.mjs, the new tide-crossing/page.test.mjs and the Tide Crossing cases in playtest.test.mjs all passed. The repo has no scripts/gate.ts, no scripts/design-lint.ts and no tsconfig, so bun x tsc --noEmit only prints its help text and I ran none of them.

What changed

  • Page: tide-crossing/index.html draws the causeway as stone slabs under the fixed 30-degree camera, with hard shadows screen-right and lapping foam that stops under prefers-reduced-motion.

- Scene: the sand start stone, the island stone with a flag, the walker, and blue water with wave lines over every stone covered at the current tick. A tide gauge at the left shows the water level and next tick's level. - Ripple edge: a stone that goes under next tick gets a dashed ripple ring as well as the HUD naming it. - Input: arrows or WASD call move, Space calls wait. On touch, tapping a neighbouring stone steps there and tapping the walker's stone waits. After a win a tap goes to the next level, and after a loss it restarts. - Keys and HUD: R restarts and N goes to the next level after a win. The HUD shows the level name, tick, "Moves N of par P" and the stones going under next tick. - Announcements: each move, each refusal reason and the state's line go through an aria-live region. There is a #mute button with synthesized sound, no .mp3, and the rules popup is four lines.

  • Catalogue:

- shell.js has the GAMES entry (id tide-crossing, Puzzle, Keys, music: false, forged: true) and index.html has the matching <li>. - The town building comes from town.js automatically, since it lays out buildings from GAMES. - The README has the Games row, the no-music list and the reduced-motion note. - og/tide-crossing.png and og/home.png are regenerated with bun scripts/og.mjs.

  • Tests:

- rounds.mjs has a scripted round that plays the first level's stated solution to "Crossed in 3 ticks against par 3: on par". - serve.test.mjs checks that /tide-crossing/ and /tide-crossing/causeway.js answer 200. - tide-crossing/page.test.mjs covers keys, refusal messages, the next-tick list, losing, restart, touch taps and reduced motion.

What I chose not to do

  • No save of the current level; the issue didn't ask for one.
  • "Under next tick" is read from the rules' own tideAt and the stated tide[t] >= h rule, because causeway.js has no function that lists those stones. A small helper there would let the page drop that read.

The tide gauge and the drawn stone height (0.5 + 0.12 × height) are my own visual choices, so I'd look at the preview for those.

Closes #349

commented

Tide Crossing is added as a playable page on the rules in tide-crossing/causeway.js, which I left untouched. It's on the branch and rebased on main, which had nothing new. I didn't run the full bun test; the forge's check runs it on this push. Before pushing, serve.test.mjs, shell.test.mjs, town.test.mjs, the new tide-crossing/page.test.mjs and the Tide Crossing cases in playtest.test.mjs all passed. The repo has no scripts/gate.ts, no scripts/design-lint.ts and no tsconfig, so bun x tsc --noEmit only prints its help text and I ran none of them.

What changed

  • Page: tide-crossing/index.html draws the causeway as stone slabs under the fixed 30-degree camera, with hard shadows screen-right and lapping foam that stops under prefers-reduced-motion.

- Scene: the sand start stone, the island stone with a flag, the walker, and blue water with wave lines over every stone covered at the current tick. A tide gauge at the left shows the water level and next tick's level. - Ripple edge: a stone that goes under next tick gets a dashed ripple ring as well as the HUD naming it. - Input: arrows or WASD call move, Space calls wait. On touch, tapping a neighbouring stone steps there and tapping the walker's stone waits. After a win a tap goes to the next level, and after a loss it restarts. - Keys and HUD: R restarts and N goes to the next level after a win. The HUD shows the level name, tick, "Moves N of par P" and the stones going under next tick. - Announcements: each move, each refusal reason and the state's line go through an aria-live region. There is a #mute button with synthesized sound, no .mp3, and the rules popup is four lines.

  • Catalogue:

- shell.js has the GAMES entry (id tide-crossing, Puzzle, Keys, music: false, forged: true) and index.html has the matching <li>. - The town building comes from town.js automatically, since it lays out buildings from GAMES. - The README has the Games row, the no-music list and the reduced-motion note. - og/tide-crossing.png and og/home.png are regenerated with bun scripts/og.mjs.

  • Tests:

- rounds.mjs has a scripted round that plays the first level's stated solution to "Crossed in 3 ticks against par 3: on par". - serve.test.mjs checks that /tide-crossing/ and /tide-crossing/causeway.js answer 200. - tide-crossing/page.test.mjs covers keys, refusal messages, the next-tick list, losing, restart, touch taps and reduced motion.

What I chose not to do

  • No save of the current level; the issue didn't ask for one.
  • "Under next tick" is read from the rules' own tideAt and the stated tide[t] >= h rule, because causeway.js has no function that lists those stones. A small helper there would let the page drop that read.

The tide gauge and the drawn stone height (0.5 + 0.12 × height) are my own visual choices, so I'd look at the preview for those.

commented

I merged main into the branch and pushed it. The branch now has both Tide Crossing and Pumpkin Patch, which arrived from main.

  • Tests: I ran serve.test.mjs and the tide-crossing tests: 111 pass, 0 fail. I did not run the full suite; the forge's check does that on the push.
  • Type check: bun x tsc --noEmit printed only its usage help, so I take it the repo has no tsconfig, and that check did not run.
  • README.md: I kept both catalogue rows. The "add a game" music list and the ambient-motion list now name Tide Crossing alongside Pumpkin Patch.
  • shell.js: both GAMES entries are kept.
  • serve.test.mjs: both games' "served without a track" tests are kept.
  • og/home.png: I regenerated it with bun scripts/og.mjs, so the collage includes both games and the serve test's byte-for-byte check still holds.
Approved

Plays through TideCrossing only, announces every move and refusal through the live region, and the catalogue, README, og cards, rounds and serve test are all in place. Next two things: (1) move the next-tick stone list into causeway.js as a helper so the page stops re-deriving the covers rule; (2) the HUD says Moves N of par P but counts ticks, so waits count as moves; say Ticks N of par P.

commented

Left #349 open: 1 unticked item remain (rounds.mjs has a scripted round for tide-crossing that reaches the end line (the first level's solution is in the rules). serve.test.mjs asserts that /tide-crossing/ and /tide-crossing/causeway.js answer 200. playtest.test.mjs passes for the folder, and bun test passes. Any new page test stays inside the per-game test budget the suite already holds to.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs