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

Migrated from github.com/amirmushichge/pixel-plays

Add Skipping Rope: the playable page and its place in the catalogue, on the rules in `skipping-rope/rope.js` #295

Merged opened this

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

Merged

Skipping Rope now has a playable page at /skipping-rope/ and a place in the catalogue, on the rules in skipping-rope/rope.js. I haven't run bun test as a whole suite.

Notes

shipped production is serving it deploy ab54f53

opened this

Skipping Rope now has a playable page at /skipping-rope/ and a place in the catalogue, on the rules in skipping-rope/rope.js. I haven't run bun test as a whole suite. What I ran passes: the Skipping Rope page and rules tests, the Skipping Rope playtests (playtest.test.mjs, filtered to this game), and shell.test.mjs, town.test.mjs and serve.test.mjs. bun x tsc --noEmit printed only its usage text. scripts/design-lint.ts and scripts/gate.ts don't exist in this clone, so neither ran. The forge's check will run the full suite.

What changed

  • Page: skipping-rope/index.html draws a school yard with two friends turning the rope and a line of skippers between them. The yard has tarmac, a grass verge, a hopscotch grid, a fence and a tree.
  • Controls and rules: Tap the canvas, or press Space (Enter or ArrowUp also work), to jump. The page drives the game only through rope.js: it calls tick, jump, angle and airborne, and adds no rule of its own. The HUD shows what the rules state reports: skips of 12, score, skippers on the rope, seconds a turn, and best skips.
  • Visual rules:

- The canvas is 360x280 on the engine's fixed camera, with hard shadows falling screen-right. Grass and leaves sway only when prefers-reduced-motion is off. - Your skipper wears a yellow cap and a red shirt; the others have no cap. - A chalk line on the ground flashes when the rope touches it, as well as the sound. - The aria-label says how to play, and the rules popup is three lines. There is a #mute button and no .mp3.

  • Catalogue: the entry is in GAMES in shell.js exactly as the issue gave it, with the matching <li> in the root index.html. The README has a Games table row and the entry in the no-music list. bun scripts/og.mjs has been run. The town building appears from GAMES on its own; town.js is unchanged.
  • Tests:

- rounds.mjs has a scripted round that jumps when the rope is a quarter second from the ground and reaches "You win: 12 skips". - serve.test.mjs asserts that /skipping-rope/ and /skipping-rope/rope.js answer 200. - skipping-rope/page.test.mjs has five tests: jumping, the chalk flash, being caught and restarting, mute, and the page source. - The playtests for the folder pass.

What I chose not to do

  • No "tap to start" gate: the rope turns from the first frame, which gives you the rules' first second to jump.
  • After the game ends, a tap is ignored for 0.6 s, so frantic tapping doesn't restart it at once.
  • The chalk flash and the rope's turning keep running under reduced motion, because they are gameplay.
  • The rope's height at the outer skipper slots is only a drawing. Nothing in it changes the rules.

To try it Run bun run serve.mjs as forge.json says and open /skipping-rope/. Press Space as the rope comes down, and watch the chalk line flash as it lands.

🤖 Generated with Claude Code

Closes #272

2 earlier comments · 2 events
commented

Skipping Rope now has a playable page at /skipping-rope/ and a place in the catalogue, on the rules in skipping-rope/rope.js. I haven't run bun test as a whole suite. What I ran passes: the Skipping Rope page and rules tests, the Skipping Rope playtests (playtest.test.mjs, filtered to this game), and shell.test.mjs, town.test.mjs and serve.test.mjs. bun x tsc --noEmit printed only its usage text. scripts/design-lint.ts and scripts/gate.ts don't exist in this clone, so neither ran. The forge's check will run the full suite.

What changed

  • Page: skipping-rope/index.html draws a school yard with two friends turning the rope and a line of skippers between them. The yard has tarmac, a grass verge, a hopscotch grid, a fence and a tree.
  • Controls and rules: Tap the canvas, or press Space (Enter or ArrowUp also work), to jump. The page drives the game only through rope.js: it calls tick, jump, angle and airborne, and adds no rule of its own. The HUD shows what the rules state reports: skips of 12, score, skippers on the rope, seconds a turn, and best skips.
  • Visual rules:

- The canvas is 360x280 on the engine's fixed camera, with hard shadows falling screen-right. Grass and leaves sway only when prefers-reduced-motion is off. - Your skipper wears a yellow cap and a red shirt; the others have no cap. - A chalk line on the ground flashes when the rope touches it, as well as the sound. - The aria-label says how to play, and the rules popup is three lines. There is a #mute button and no .mp3.

  • Catalogue: the entry is in GAMES in shell.js exactly as the issue gave it, with the matching <li> in the root index.html. The README has a Games table row and the entry in the no-music list. bun scripts/og.mjs has been run. The town building appears from GAMES on its own; town.js is unchanged.
  • Tests:

- rounds.mjs has a scripted round that jumps when the rope is a quarter second from the ground and reaches "You win: 12 skips". - serve.test.mjs asserts that /skipping-rope/ and /skipping-rope/rope.js answer 200. - skipping-rope/page.test.mjs has five tests: jumping, the chalk flash, being caught and restarting, mute, and the page source. - The playtests for the folder pass.

What I chose not to do

  • No "tap to start" gate: the rope turns from the first frame, which gives you the rules' first second to jump.
  • After the game ends, a tap is ignored for 0.6 s, so frantic tapping doesn't restart it at once.
  • The chalk flash and the rope's turning keep running under reduced motion, because they are gameplay.
  • The rope's height at the outer skipper slots is only a drawing. Nothing in it changes the rules.

To try it Run bun run serve.mjs as forge.json says and open /skipping-rope/. Press Space as the rope comes down, and watch the chalk line flash as it lands.

🤖 Generated with Claude Code

Changes requested — before the latest push

One thing must change before this lands: the pull commits 23 stray empty files that have nothing to do with Skipping Rope. They are .bash_profile, .bashrc, .gitconfig, .gitmodules, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc, and .claude/{agents,commands,hooks,launch.json,loop.md,output-styles,routines,scheduled_tasks.json,settings.json,settings.local.json,skills,workflows}. Each is a zero-byte file at the repository root or under .claude/. They look like sandbox placeholders that were staged by accident. Remove them all with git rm. Empty .gitconfig, .mcp.json and .claude/settings*.json files can also shadow or break real tooling config. This fails the Clean item on the list. Nothing else needs to change.

I could not view the screenshots because the file tools are confined to the clone. This review is from the diff only.

What I read in the diff is otherwise good. The page drives the game only through rope.js. It has a cap on your skipper, a chalk-line flash, a 44px mute button, an aria-label that says how to play, a three-line rules popup and no .mp3. The catalogue, README, rounds.mjs and serve.test.mjs entries are in place.

Optional, for next time: several assertions in page.test.mjs are source-string greps (toContain('const t = STILL ? 0'), 'k === 0 ? YOU'). They would not catch a regression in the behaviour itself, so a picture-based check of the cap would be stronger.

Boxes: once the stray files are gone I expect to tick all four. They are met by the diff except for that cleanliness issue, so I report them as left only because the pull cannot land as it is.

commented

The pull is clean now: I removed all 23 stray empty files and pushed (85ee71c). Compared with main, the diff adds only og/skipping-rope.png, skipping-rope/index.html and skipping-rope/page.test.mjs. The other files in it are edits to existing files.

I ran no tests this time. The only change since the last push is removing those files from git, and no game or test code was touched.

What went wrong: the sandbox put those empty placeholder files in the working tree, and an earlier commit picked them up. I removed them from git's index only, so the placeholders still sit in my local sandbox, but not in the pull.

Page test: I agree the greps for const t = STILL ? 0 and k === 0 ? YOU in skipping-rope/page.test.mjs are weak, and I left them. A picture-based check of the cap would be stronger, but you said nothing else needs to change on this pull. I'd do that check in a follow-up.

🤖 Generated with Claude Code

Approved

The stray empty dotfiles from the last round are gone (85ee71c), so the pull is again the page, its test, the catalogue entries, the round, the serve test and the OG card. The preview serves /skipping-rope/ with 200. Two things to do next, both non-blocking: (1) replace the source greps for STILL ? 0 and k === 0 ? YOU in page.test.mjs with a picture check that the cap is drawn on your skipper only; (2) stop the chalk flash from running under reduced motion if it is more than the small flash it is now. I could not diff against my previous head here because the commit is not in the clone.

commented

Left #272 open: 1 unticked item remain (Listed in GAMES in shell.js as { id: 'skipping-rope', title: 'Skipping Rope', blurb: 'Jump the turning rope as it quickens and friends join the line', kind: 'Timing', input: 'Tap', accent: '#d0573c', music: false, forged: true }. It has the matching <li> in the root index.html, a building in the town from town.js like every other game, and appears in the README Games table and the list of games without music. bun scripts/og.mjs has been run.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs