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

Migrated from github.com/amirmushichge/pixel-plays

Add Market Barrow: the playable page and its place in the catalogue, on the rules in `market-barrow/barrow.js` #193

Parked opened this
Closed without merging

Market Barrow now has a playable page at /market-barrow/, listed in the catalogue and driven only through market-barrow/barrow.js. The serve, shell and town tests pass (103). The playtest.test.mjs cases for market-barrow and the scripted-round check pass, but I did not run the whole of playtest.test.mjs to completion.

Notes

stopped parked by the crew deploy 51de1ac

opened this

Market Barrow now has a playable page at /market-barrow/, listed in the catalogue and driven only through market-barrow/barrow.js. The serve, shell and town tests pass (103). The playtest.test.mjs cases for market-barrow and the scripted-round check pass, but I did not run the whole of playtest.test.mjs to completion. bun x tsc --noEmit printed only its usage text, so I can't say it passed. The forge runs the full check on this push.

What to look at

  • Page: the village lane has four numbered stalls (Mill, Harbour, Orchard, Forge), each with a chalk price board of four numbers. Under the lane are a buy and a sell button for each good. The page adds no rules of its own.

- Barrow: it glides to the stall you travel to and carries the goods as small crates. The load is also written as a number above it. - Controls: tap a stall, or press 1–4 or Left/Right, to travel. Left/Right is an addition: the playtest's keyboard test only presses arrows, Space and Enter, so something on those keys had to change the game. When the game ends, any tap or key starts a new one. - HUD: day, coins and barrow load as the rules report them.

  • Boards: the current stall's board shows today's price. The other boards show the price you would meet on arrival, which is tomorrow's price from prices() in the rules. I chose this so the boards support planning; it adds no rule.
  • Visual rules: 360×280 canvas, fixed camera, hard shadows to the right, and a #mute button with no .mp3. The only ambient motion is the awning scallops, which stop under reduced motion. Prices, loads and stall numbers are always numbers. The aria-label says how to play and the rules popup is four lines.
  • Saving: the best score is kept in localStorage, and each new game takes a new seed.
  • Catalogue:

- Registration: GAMES in shell.js, the root index.html <li>, and the README Games table and no-music list are done. A building in the town needs no edit, since town.js draws one per GAMES entry. - Share card: og/market-barrow.png was made with bun scripts/og.mjs.

  • Tests: rounds.mjs has a scripted round that sells, buys an apple and wheels to the next stall until day 10. serve.test.mjs asserts that /market-barrow/ and /market-barrow/barrow.js answer 200. The branch was already on top of main, so no rebase was needed.

Left alone: the trade panel is DOM buttons rather than canvas-drawn ones. It reserves 124px at the bottom, so the page uses its own fitLane instead of the engine's fit. The price-board text is a bit cramped at 360 wide; I did not redo the layout.

🤖 Generated with Claude Code

Closes #169

2 earlier comments · 1 event
commented

Market Barrow now has a playable page at /market-barrow/, listed in the catalogue and driven only through market-barrow/barrow.js. The serve, shell and town tests pass (103). The playtest.test.mjs cases for market-barrow and the scripted-round check pass, but I did not run the whole of playtest.test.mjs to completion. bun x tsc --noEmit printed only its usage text, so I can't say it passed. The forge runs the full check on this push.

What to look at

  • Page: the village lane has four numbered stalls (Mill, Harbour, Orchard, Forge), each with a chalk price board of four numbers. Under the lane are a buy and a sell button for each good. The page adds no rules of its own.

- Barrow: it glides to the stall you travel to and carries the goods as small crates. The load is also written as a number above it. - Controls: tap a stall, or press 1–4 or Left/Right, to travel. Left/Right is an addition: the playtest's keyboard test only presses arrows, Space and Enter, so something on those keys had to change the game. When the game ends, any tap or key starts a new one. - HUD: day, coins and barrow load as the rules report them.

  • Boards: the current stall's board shows today's price. The other boards show the price you would meet on arrival, which is tomorrow's price from prices() in the rules. I chose this so the boards support planning; it adds no rule.
  • Visual rules: 360×280 canvas, fixed camera, hard shadows to the right, and a #mute button with no .mp3. The only ambient motion is the awning scallops, which stop under reduced motion. Prices, loads and stall numbers are always numbers. The aria-label says how to play and the rules popup is four lines.
  • Saving: the best score is kept in localStorage, and each new game takes a new seed.
  • Catalogue:

- Registration: GAMES in shell.js, the root index.html <li>, and the README Games table and no-music list are done. A building in the town needs no edit, since town.js draws one per GAMES entry. - Share card: og/market-barrow.png was made with bun scripts/og.mjs.

  • Tests: rounds.mjs has a scripted round that sells, buys an apple and wheels to the next stall until day 10. serve.test.mjs asserts that /market-barrow/ and /market-barrow/barrow.js answer 200. The branch was already on top of main, so no rebase was needed.

Left alone: the trade panel is DOM buttons rather than canvas-drawn ones. It reserves 124px at the bottom, so the page uses its own fitLane instead of the engine's fit. The price-board text is a bit cramped at 360 wide; I did not redo the layout.

🤖 Generated with Claude Code

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Market Barrow now has its playable page at market-barrow/index.html and its place in the catalogue, built on the rules in market-barrow/barrow.js. I have not seen the preview deploy pass yet.

The preview deploy had failed on the test "on a 360px phone every building of the real catalogue is still thumb-sized". With Market Barrow added, the catalogue is large enough that each building came out 33.3px wide on a 360px phone, against the 40px minimum. I raised the town canvas's minimum width from 600px to 740px, in plaza.js (MIN_CSS_WIDTH) and in the #c rule in index.html. Phones scroll the town sideways a little further. I did not touch the test.

plaza.test.mjs and serve.test.mjs pass locally. I did not run bun scripts/gate.ts, the design lint or the full suite. bun x tsc --noEmit printed its usage text rather than a clean result, so I can't say it passed.

The minimum width will need to grow again as the catalogue does. Making the town scale with the catalogue size would be the lasting fix. I left that out of this pull.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs