Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Add Ferris Wheel: the playable page and its place in the catalogue, on the rules in `ferris-wheel/wheel.js` #209
Check · Review · Land · Live done — Landed and live in production.
Ferris Wheel is playable at /ferris-wheel/, mounted like the other forged games and driven only through ferris-wheel/wheel.js. I raised the rules' jam limit from 40 to 260, since the game could not be won at 40.
shipped production is serving it deploy ab54f53
Ferris Wheel is playable at /ferris-wheel/, mounted like the other forged games and driven only through ferris-wheel/wheel.js. I raised the rules' jam limit from 40 to 260, since the game could not be won at 40.
The tests I ran pass: ferris-wheel/wheel.test.mjs, serve.test.mjs, shell.test.mjs, town.test.mjs, and the ferris-wheel cases in playtest.test.mjs. I did not run the full bun test; the forge runs that on push. bun x tsc --noEmit only printed its help text because the repo has no tsconfig. scripts/gate.ts does not exist here, so it was not run.
The page
- Wheel and queue: it draws the wheel with 8 gondolas, the riders in them, the platform and a queue of up to 8. The balance needle sits under the hub, with the jam limit marked as a line at each end of its scale.
- Weights: riders read by size and by colour (green, amber, red). The front rider's weight is on a plate above their head.
- Controls and beat: Board and Skip are buttons, or B and S. Tapping the canvas, Space or Enter also boards, and any of them restarts after the round ends. The wheel steps every 1.6 s, with a small bar under the needle showing the beat.
- HUD and ambience: it shows riders carried, steps left and the imbalance. The only ambient motion is the fairground lights blinking, and they stay lit under
prefers-reduced-motion. The gondola swing and needle ease are play feedback and snap under reduced motion. - Visual rules and sound: it keeps the 360x280 canvas, the 30° camera and the screen-right shadows. It has a
#mutebutton, a four-line rules popup and no.mp3. - Catalogue: the
GAMESentry inshell.jsis exactly as specified. The<li>inindex.html, the README Games table row and the two README lists (games without music, ambient motion) are added, andbun scripts/og.mjshas been run. - Town: the building comes from
town.jsautomatically. - Tests:
serve.test.mjsasserts that/ferris-wheel/and/ferris-wheel/wheel.jsanswer 200.rounds.mjshas a scripted round that plans the whole round on the rules' ownboard,skipandstep, then plays it one step per beat and ends balanced with at least 12 riders.
The rules change: the lightest rider is 20 kg and the first step swings it 3 m east, so every first rider gave at least 60 kg*m and jammed the wheel at 40. No round could be won, so I set LIMIT to 260 in wheel.js, with a comment. A search over the first 12 seeds found a balanced win on 11. wheel.test.mjs uses LIMIT by name and still passes.
Not done: there is no animation of a rider walking from the queue to the gondola, because boarding is instant in the rules. The queue shows only its first 8 riders and the status line gives the total waiting.
I merged main into the branch, resolved the three conflicts, and pushed; #209 should merge cleanly now.
rounds.mjs: both sides added an entry at the same spot, so I kept both theferris-wheelandlily-pondentries. The merge had dropped the} },that closesferris-wheel, so I restored it.README.md: I tookmain's text and re-added my changes: the Ferris Wheel table row, the "play on their own sound effects" list, and the blinking-lights line under ambient motion.og/home.png: I tookmain's version and regenerated it withbun scripts/og.mjs, so it includes both new cards.
Tests pass for the files this touches: serve.test.mjs, shell.test.mjs, and the Ferris Wheel and catalogue cases in playtest.test.mjs. I did not run the full suite; the forge runs it on push.
Ferris Wheel is mounted like the other forged games. The preview answers 200 at /ferris-wheel/, the catalogue entry, no-JS list item, README rows and OG cards are all there, and the Board and Skip buttons plus the B and S keys work. Reduced motion is honoured: the lights stay lit and the swing and needle snap. The rounds.mjs scripted win and the serve.test.mjs check cover the new behaviour. The LIMIT change from 40 to 260 is explained, and wheel.test.mjs uses it by name. I only fetched the preview page and read the diff; I did not play the game in a browser or run the tests.
Two things I would do next:
- Make a tap on the canvas less dangerous on a phone. A stray thumb on the canvas boards the front rider, which cannot be undone. Either keep canvas tap for restart only, or ask for a second tap. Also make the Board and Skip buttons a 44px target at 360px, since they are currently 10px-padded text.
- Check the bottom bar at 360px when the status line reads Next: 95 kg for 6 steps · 20 waiting. It sits beside three buttons. Let it wrap onto its own row so it does not squeeze them.
Ferris Wheel is playable at
/ferris-wheel/, mounted like the other forged games and driven only throughferris-wheel/wheel.js. I raised the rules' jam limit from 40 to 260, since the game could not be won at 40.The tests I ran pass:
ferris-wheel/wheel.test.mjs,serve.test.mjs,shell.test.mjs,town.test.mjs, and the ferris-wheel cases inplaytest.test.mjs. I did not run the fullbun test; the forge runs that on push.bun x tsc --noEmitonly printed its help text because the repo has no tsconfig.scripts/gate.tsdoes not exist here, so it was not run.The page
prefers-reduced-motion. The gondola swing and needle ease are play feedback and snap under reduced motion.#mutebutton, a four-line rules popup and no.mp3.GAMESentry inshell.jsis exactly as specified. The<li>inindex.html, the README Games table row and the two README lists (games without music, ambient motion) are added, andbun scripts/og.mjshas been run.town.jsautomatically.serve.test.mjsasserts that/ferris-wheel/and/ferris-wheel/wheel.jsanswer 200.rounds.mjshas a scripted round that plans the whole round on the rules' ownboard,skipandstep, then plays it one step per beat and ends balanced with at least 12 riders.The rules change: the lightest rider is 20 kg and the first step swings it 3 m east, so every first rider gave at least 60 kg*m and jammed the wheel at 40. No round could be won, so I set
LIMITto 260 inwheel.js, with a comment. A search over the first 12 seeds found a balanced win on 11.wheel.test.mjsusesLIMITby name and still passes.Not done: there is no animation of a rider walking from the queue to the gondola, because boarding is instant in the rules. The queue shows only its first 8 riders and the status line gives the total waiting.
Closes #177