Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Add Goalkeeper: dive left or right to save ten penalties in a village football ground #75
Merged 31d 5h ago, live in production
Goalkeeper is added as a new game: ten penalties on a village pitch, and you are in goal. bun test goalkeeper playtest.test.mjs serve.test.mjs shell.test.mjs passes (176 tests). I did not run bun test on the whole repo.
-
Reviews
Changes requested — before the latest pushPreview works: /, /goalkeeper/, shootout.js and the og card all answer 200, the rules are cleanly separated and well tested. Changes needed, all in one round:
- Fix first: the input description is wrong in three places. goalkeeper/index.html (the Rules popup) and the README row say "tap the left or right half of the canvas", but the code splits thirds at 36% and 64% (pointerdown handler: u < .36 / u > .64). A player tapping at 45% expects a dive and stays up instead. Either make the code a true half split with a middle dead-zone described, or say "left third / middle / right third" in the popup, the canvas aria-label and the README.
- Dead code:
let netBulge = 0;in goalkeeper/index.html is declared and never used. Remove it. - Test gap: the early-dive switch is only covered at rules level. Add a page test that dives before the tell window opens on a seed where the taker switches, and asserts the status shows "you dived early, the taker switched" (the one behaviour the popup promises that no page test would catch breaking).
- Direction: the README row and credits give no reference for the original idea of penalty-saving games beyond the generic crew note; if there is a specific inspiration, name it, otherwise state in the README that the concept is the ordinary football penalty.
ApprovedAll four earlier asks are met in the head. (1) Tap zones: the rules popup, aria-label and README now say thirds, matching the 36%/64% split in the code. (2) The dead
netBulgeis gone. (3)page.test.mjsnow covers the early-dive switch and also checks the same dive inside the window does not switch. (4) The README row says the concept is the plain football penalty, with no source game. The preview serves /goalkeeper/ with a 200. The game is wired into the home page, shell.js, the README, serve.test.mjs and og cards. The rules module is plain data with seeded tests. There are no new dependencies. I could not fetch the old head here, so I judged the change as a whole and found no new problems.Non-blocking: the README row is very long; a shorter row would read better.
-
Checks
shipped production is serving it deploy ab54f53
-
History
- Goalkeeper: describe the tap zones as thirds, drop dead code, test the early-dive switch, name the concept 8c7d428
- Add Goalkeeper: dive left or right to save ten penalties in a village football ground (#65) fd2b69b
- Add Bell Tower: ring the peal back on four bells, one bell longer each round (#69) 8a3ca29
- Add Archery: ten arrows at a straw target, reading the wind off a pennant (#64) 8327827
- Add Tram Line: drive a city tram and stop each door on the yellow mark (#63) cf817a1
- Add Tightrope: walk a wire between two rooftops, leaning to keep your balance in the wind (#60) 93e1bbc
- games need to have a much higher playability standard. tests that actually pl… (#49) 8c0d92c
- Add Ice Fishing: drop a line through the ice and reel each fish up before the line snaps (#58) 07375f1
- Add Bread Oven: slide loaves into a wood-fired oven and pull each one out golden (#54) 9c2022a
- Add Beekeeper: smoke the hive calm and lift out honey frames before the bees swarm (#53) fd12dfd
- Add Campfire: keep the fire burning through the night by feeding it the right logs (#52) db506c3
- better game browser. right now the list is kinda lame. i would love to see mo… (#47) cd10642
- fantastic og metadata. the fact that these games are static means we could re… (#48) ecaabdf
- metrics to quantitatively produce better games. which games are played the mo… (#46) 4d827a6
- Add Domino Run: set out a line of dominoes along a path, then tip the first (#41) 2ed57d4
- Add Window Washer: squeegee a grimy window clean before the cradle drops a floor (#38) 3e093d7
- Add Market Scale: weigh fruit onto a pan scale to hit each customer's order (#37) b54bea6
- Add Lighthouse: sweep the beam to turn boats away from the rocks (#33) 20289eb
- Add Free Throw: sink ten shots on a rooftop court by releasing at the top of the jump (#29) 9363771
- Add Orchard: catch falling apples in a basket before the brown ones (#28) 1f8ac24
Goalkeeper is added as a new game: ten penalties on a village pitch, and you are in goal. bun test goalkeeper playtest.test.mjs serve.test.mjs shell.test.mjs passes (176 tests). I did not run bun test on the whole repo. The type check printed no errors but the repo has no tsconfig, so I'm not counting it. There is no scripts/gate.ts, scripts/fast.ts or scripts/design-lint.ts in this clone, so none of those ran.
- Rules:
goalkeeper/shootout.jsholds them as plain data in and out. The shot comes from the seed (side and height). The tell window opens 1.0 s before the kick on penalty 1 and shrinks by 0.06 s per penalty. The ball takes 0.3 s to arrive.- Saves and goals: A dive to the shot side before the ball arrives saves. A wrong-side dive, a dive after arrival, or never moving concedes. Staying up (middle tap or Up) saves a shot down the middle.
- Early dives: A dive before the window opens lets the taker switch to another side half the time.
- End of round: Seven or more saves is a win, fewer is a loss. The tenth penalty ends the round.
shootout.test.mjscovers each rule.
- The tell: Before the window the taker runs up neutrally. Once it opens, a side shot shows as a body tilt, a sideways plant foot and the far arm flung wide. A shot down the middle shows as a crouch with both arms spread. I checked frames of the left lean at 4× zoom and it reads clearly; I did not review the right-side or centre lean frames. The rules popup says what the tells mean.
- Scene: The pitch has chalk lines, a stone wall, a goal with a net, and a flag on the wall. Only the net and the flag move on their own, and both stop under
prefers-reduced-motion. The people are drawn 1.2× larger than the goal would strictly allow, so the lean is readable at 360×280. - Input: Tap or click the left, middle or right of the canvas (thirds, split at 36% and 64%), or press Left, Right and Up. A tap after the result starts a new round.
- Wiring:
GAMESentry, home<li>, README table row, music-free list andserve.test.mjsare done, andbun scripts/og.mjshas been run.og/goalkeeper.pngis new andog/home.pngis regenerated. No.mp3is committed. The page has#mute. - Tests:
goalkeeper/page.test.mjsplays the page in the playtest harness: a save from reading the tell, a wrong-side dive, standing still, the keyboard, a full ten-save round with the saved best, and a loss line. The sharedplaytest.test.mjspasses for the new folder too.
Choices:
- High or low shots change the drawn ball and the keeper's reach but not the rules. A dive to the right side saves either way.
- Standing still concedes even a shot down the middle. Only an explicit middle tap or Up saves it.
- No dependencies added.
To try it, open /goalkeeper/. Watch the taker from about 0.5 s into the run-up and tap the side they lean. Dive before they show it to see the switch.
An untracked set of dotfiles (.bashrc, .claude/ and others) was already in the clone; I did not commit them.
🤖 Generated with Claude Code
All four points from the review are addressed and pushed. bun test goalkeeper passes (18 tests); I did not rerun the full suite or serve.test.mjs for this wording change.
- Tap zones: I kept the thirds in the code (dive left below 36%, right above 64%, stay up in between). The rules popup, the canvas aria-label and the README row now say "left third, right third, middle third". This replaces the "half" wording the issue first asked for. That means a tap at 45% staying up is now what the text promises. I did not regenerate
og/. The share-card description comes from the one-line blurb, which doesn't mention halves. - Dead code: I removed
let netBulge = 0;. - Test gap:
goalkeeper/page.test.mjshas a new page test. It finds a seed where the early dive switches the taker and taps the middle before the tell window opens. It asserts the status says "you dived early, the taker switched". It then repeats the same dive inside the window on the same seed and asserts no switch is reported. - Direction: The README row now says the concept is the ordinary football penalty, with no particular game as its source. I know of no specific inspiration.
🤖 Generated with Claude Code
Goalkeeper is added as a new game: ten penalties on a village pitch, and you are in goal.
bun test goalkeeper playtest.test.mjs serve.test.mjs shell.test.mjspasses (176 tests). I did not runbun teston the whole repo. The type check printed no errors but the repo has no tsconfig, so I'm not counting it. There is noscripts/gate.ts,scripts/fast.tsorscripts/design-lint.tsin this clone, so none of those ran.goalkeeper/shootout.jsholds them as plain data in and out. The shot comes from the seed (side and height). The tell window opens 1.0 s before the kick on penalty 1 and shrinks by 0.06 s per penalty. The ball takes 0.3 s to arrive.shootout.test.mjscovers each rule.prefers-reduced-motion. The people are drawn 1.2× larger than the goal would strictly allow, so the lean is readable at 360×280.GAMESentry, home<li>, README table row, music-free list andserve.test.mjsare done, andbun scripts/og.mjshas been run.og/goalkeeper.pngis new andog/home.pngis regenerated. No.mp3is committed. The page has#mute.goalkeeper/page.test.mjsplays the page in the playtest harness: a save from reading the tell, a wrong-side dive, standing still, the keyboard, a full ten-save round with the saved best, and a loss line. The sharedplaytest.test.mjspasses for the new folder too.Choices:
To try it, open
/goalkeeper/. Watch the taker from about 0.5 s into the run-up and tap the side they lean. Dive before they show it to see the switch.An untracked set of dotfiles (
.bashrc,.claude/and others) was already in the clone; I did not commit them.🤖 Generated with Claude Code
Closes #65