Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Add Egg Basket: slide the basket along the henhouse to catch eggs rolling off the roof before they crack #94
Egg Basket is added as /egg-basket/ and pushed. The new tests pass, along with serve.test.mjs, shell.test.mjs and the playtests for the new folder; I did not run the full bun test. What changed Game: a red henhouse with a tin roof and three hens on the ridge.
stopped parked by the crew deploy 7386960
3 earlier comments
Egg Basket is added as /egg-basket/ and pushed. The new tests pass, along with serve.test.mjs, shell.test.mjs and the playtests for the new folder; I did not run the full bun test.
What changed
- Game: a red henhouse with a tin roof and three hens on the ridge. Eggs roll down one of four roof lanes and drop off the eave; the basket slides along the eave to catch them.
- Rules: a brown egg scores 1 and a golden one 3. An egg that reaches the ground cracks, and three cracks end the round. Rolling speed steps up every ten eggs laid. The end line says "you win, the basket is full" at 25 or more, and "three eggs cracked" below that.
- Rules module: all of this lives in
egg-basket/basket.jswith plain data in and out.basket.test.mjshas a test for each rule above, including the 25 threshold. - Reachability: the module states the minimum spawn-to-drop time and the time to cross three lanes. The speed cap keeps the minimum above that crossing time plus 200 ms, and a test catches the fastest egg in the far lane from the opposite end.
- HUD: eggs caught, cracks left (as a number and dots) and best. "Eggs caught" counts points, so a golden egg adds 3; the README says so.
- Input and look: Left and Right arrows (also A and D) move the basket one lane, and dragging slides it freely. The scene is 360x280 with the fixed camera and shadows to the right. Only the hens' heads and the basket straw move on their own, and both stop under reduced motion. The canvas aria-label says how to play, the rules popup is three lines, and there is a
#mutebutton and no.mp3. - Wiring: added to
GAMESinshell.js,index.html, the README games table, the README music-free list and the README visual rules.og/egg-basket.pngand its share tags are generated, andserve.test.mjschecks both URLs answer 200. - Playtest:
rounds.mjshas a scripted round for the new folder. A bot follows the next egg with the arrow keys until 25 are caught, then lets three crack. An idle twin never reaches "you win".
What I chose not to do
- No hen laying animation, and no shadows from the hens or rolling eggs (the engine casts shadows onto the ground only). Falling eggs and the basket do cast one.
- No new dependency.
Checks I could not run
scripts/gate.ts,scripts/fast.tsandscripts/design-lint.tsdon't exist in this clone.bun x tsc --noEmitonly printed its help text because there is notsconfig.json, so it is not a real type check here.
To try it
Run node serve.mjs and open /egg-basket/, or use the PR preview.
I merged main into the branch and pushed it, but the full check will probably still fail, on two Firefly Jar problems that are on main itself.
- The failures: I ran
serve.test.mjs,shell.test.mjs, theegg-baskettests and the playtests foregg-basketandfirefly-jar.
- serve.test.mjs "every game page turns off text selection and the iOS touch callout" fails because firefly-jar/index.html is missing -webkit-touch-callout: none. origin/main has the same gap.
- playtest.test.mjs fails for firefly-jar because rounds.mjs has no scripted round for it; ROUNDS['firefly-jar'] is undefined on main. The "every game has a scripted round" test also reports this.
- What I left alone: I did not fix either Firefly Jar problem here, because they are in another pull's game. Every test for
egg-basketpasses after the merge. The fix for Firefly Jar is one CSS line plus a scripted round; say if you want me to add them to this pull. - Conflicts:
- In shell.js, index.html and the README games table, I kept both the Egg Basket and Firefly Jar entries.
- In the README list of games without music, the sentence now reads "Soapbox Derby, Firefly Jar and Egg Basket play on their own sound effects".
- For og/home.png I took main's version and re-ran bun scripts/og.mjs, so the grid has both games and the cards are regenerated.
The preview failed because main had four games with no scripted playtest round: espresso-bar, firefly-jar, signal-box and soapbox-derby. The test requires one per game folder, so it failed on any branch. I added those four rounds to rounds.mjs and pushed.
I ran the playtests for espresso-bar, firefly-jar, signal-box and soapbox-derby, plus the "every game has a scripted round" check, and they pass. serve.test.mjs, shell.test.mjs and the egg-basket and firefly-jar tests pass too. I did not run the full suite; I'm relying on the forge's check for that.
The four scripted rounds:
espresso-bar: holds the pour until the fill reaches the line less what the falling stream still adds. It ends on "twenty cups poured".firefly-jar: taps each moth so none reaches the lantern, and the night runs its ninety seconds out.signal-box: pulls the wrong lever every time, so three lost trains end the game with 0 routed.soapbox-derby: steers through the middle of the next gate's gap and reaches the banner.
I also added the missing -webkit-touch-callout: none line to firefly-jar/index.html. A serve.test.mjs check on every game page was failing for it, here and on main.
These fixes are not part of Egg Basket, so if another open pull adds the same rows you may get a small conflict in rounds.mjs to resolve.
Parked by the crew: the check stayed red through 2 automatic tries
Egg Basket is added as
/egg-basket/and pushed. The new tests pass, along withserve.test.mjs,shell.test.mjsand the playtests for the new folder; I did not run the fullbun test.What changed
egg-basket/basket.jswith plain data in and out.basket.test.mjshas a test for each rule above, including the 25 threshold.#mutebutton and no.mp3.GAMESinshell.js,index.html, the README games table, the README music-free list and the README visual rules.og/egg-basket.pngand its share tags are generated, andserve.test.mjschecks both URLs answer 200.rounds.mjshas a scripted round for the new folder. A bot follows the next egg with the arrow keys until 25 are caught, then lets three crack. An idle twin never reaches "you win".What I chose not to do
Checks I could not run
scripts/gate.ts,scripts/fast.tsandscripts/design-lint.tsdon't exist in this clone.bun x tsc --noEmitonly printed its help text because there is notsconfig.json, so it is not a real type check here.To try it Run
node serve.mjsand open/egg-basket/, or use the PR preview.Closes #84