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

Migrated from github.com/amirmushichge/pixel-plays

Add Carousel: the playable page and its place in the catalogue, on the rules in `carousel/ride.js` #236

Closed opened this
Closed without merging

vesper/pixel-plays:vesper/188-add-carousel-the-playable-page-and-its-p → main 11 commits fork

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
8 files changed +341 −2
README.md +3 −2

Diff not shown — a line 2,147 characters wide (limit 2,000). +3 −2

View file
index.html +1
@@ -121,6 +121,7 @@ footer a::after { content: none; }
121121 <li data-kind="Puzzle" data-input="Keys" style="--accent:#3d6e4f"><a href="hedge-maze/">Hedge Maze</a><span>Find the way through the hedges to the fountain before the gardener rings the bell</span><span>Game forged by the crew</span><span class="tags">Puzzle · Keys</span></li>
122122 <li data-kind="Memory" data-input="Tap" style="--accent:#6b8f3a"><a href="bird-watch/">Bird Watch</a><span>Remember where each bird perched</span><span>Game forged by the crew</span><span class="tags">Memory · Tap</span></li>
123123 <li data-kind="Strategy" data-input="Tap" style="--accent:#3d7f6e"><a href="bunting/">Bunting</a><span>Hang the flags for the fete so no two neighbours match</span><span>Game forged by the crew</span><span class="tags">Strategy · Tap</span></li>
124 <li data-kind="Timing" data-input="Tap" style="--accent:#c4893a"><a href="carousel/">Carousel</a><span>Ride the horses and snatch the brass ring as you pass the dispenser</span><span>Game forged by the crew</span><span class="tags">Timing · Tap</span></li>
124125 </ul>
125126 <footer>Concept by <a href="https://x.com/awwbhi2">abhi</a>. Game by <a href="https://x.com/AmirMushich">AmirMushich</a>. Visual reference for the style: shawn.'s <a href="https://x.com/zzzzshawn/status/2111546123546661289">Small plays</a>; no assets or subjects were copied.<br><a href="stats/">Most played</a></footer>
126127 </main>
og/home.png
Binary file not shown.
rounds.mjs +5
@@ -344,6 +344,11 @@ export const ROUNDS = {
344344 const { index, offset } = g.read('Rope.nearestBeat(R.t)');
345345 if (g.read('R.phase') === 'pull' && Math.abs(offset) < .05 && g.read('R.lastBeat') !== index) g.press(' ', .04); else g.step(1);
346346 } },
347 // grab as the rider reaches the dispenser: the frame the angle is as close to it as a frame gets, once a turn
348 'carousel': { over: /play again/, outcome: /Ride over: [1-9]\d* rings, \d+ points/, beat: g => {
349 const [angle, speed, spent, status] = g.read('[P.angle, P.speed, P.spent, P.status]');
350 if (status === 'playing' && !spent && Math.abs(angle - 180) <= speed / 50) g.press(' ', .02); else g.step(1);
351 } },
347352 'window-washer': { over: /play again/, outcome: /[1-9]\d* of 500/, beat: g => g.drag([60, 100], [300, 100], .6) },
348353 };
349354
serve.test.mjs +7
@@ -565,6 +565,13 @@ test('Bunting and its rules script are served without a track', async () => {
565565 expect((await fetch(base + '/bunting/line.js')).status).toBe(200);
566566 });
567567
568 test('Carousel and its rules script are served without a track', async () => {
569 const page = await fetch(base + '/carousel/');
570 expect(page.status).toBe(200);
571 expect(page.headers.get('content-type')).toBe('text/html; charset=utf-8');
572 expect((await fetch(base + '/carousel/ride.js')).status).toBe(200);
573 });
574
568575 test('Hedge Maze and its rules script are served without a track', async () => {
569576 const page = await fetch(base + '/hedge-maze/');
570577 expect(page.status).toBe(200);
shell.js +1
@@ -61,6 +61,7 @@ window.PixelPlays = (() => {
6161 { id: 'hedge-maze', title: 'Hedge Maze', blurb: 'Find the way through the hedges to the fountain before the gardener rings the bell', kind: 'Puzzle', input: 'Keys', accent: '#3d6e4f', music: false, forged: true },
6262 { id: 'bird-watch', title: 'Bird Watch', blurb: 'Remember where each bird perched', kind: 'Memory', input: 'Tap', accent: '#6b8f3a', music: false, forged: true },
6363 { id: 'bunting', title: 'Bunting', blurb: 'Hang the flags for the fete so no two neighbours match', kind: 'Strategy', input: 'Tap', accent: '#3d7f6e', music: false, forged: true },
64 { id: 'carousel', title: 'Carousel', blurb: 'Ride the horses and snatch the brass ring as you pass the dispenser', kind: 'Timing', input: 'Tap', accent: '#c4893a', music: false, forged: true },
6465 ];
6566 const MUSIC_VOLUME = .4;
6667 const CREDITS = [

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs