Skip to content

feat(site): add Prisma Arcade - #8143

Draft
sneub wants to merge 6 commits into
mainfrom
prisma-arcade
Draft

feat(site): add Prisma Arcade#8143
sneub wants to merge 6 commits into
mainfrom
prisma-arcade

Conversation

@sneub

@sneub sneub commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What this is

Prisma Arcade is a playful /arcade page for prisma.io: six tiny retro games built by the Prisma team, with Comet Cat as the featured game and a high-score leaderboard wired for a $500 in Prisma credits contest.

This PR takes the original experimental arcade and makes it merge-ready. The page keeps its full retro CRT takeover aesthetic, and underneath it the six games now share one engine kit, the leaderboard and prize messaging are in place, and the input, cleanup, and timing bugs are fixed.

Page structure

  • Takeover: /arcade intentionally hides the site nav and footer and brings its own look: starfield, synthwave grid floor, CRT scanlines and vignette, glitch title, bottom ticker, and an "exit to prisma.io" link. Pixel type (Press Start 2P and VT323) is loaded only on this page. The landing view follows a strict hierarchy so nothing competes with the game: static title, one line of copy, Comet Cat as the sole focal point, and slow, dim ambient motion.
  • Comet Cat, featured: embedded directly under the title and playable in place, with a full screen toggle (the shared game shell offers it on every game). Keyboard input is scoped to the focused game screen, so Space and the arrow keys never hijack page scrolling.
  • Hall of Fame: a compact sidebar next to Comet Cat showing the top three, expandable to the top ten (it auto-expands when a freshly claimed score lands below third). Arcade-style initials claim after a qualifying run, plus the prize line.
  • The back row: an explicit "5 more games in the back row" link points below the fold, where Snake, Invaders, Stacker, Muncher, and Meteors sit as cabinet cards. Each opens in a retro-styled dialog (design-system dialog underneath, so focus trap and Esc behave) and keeps a per-browser personal best.

Leaderboard and prize

The leaderboard is designed to become global: the panel says "global leaderboard coming soon", and its storage sits behind async fetchLeaderboard/submitScore functions that are the exact seam for the future API. Until that backend lands (apps/site has no database today) they are backed by localStorage, and the panel is honest that scores live on the device. Prize copy commits to $500 in Prisma credits, awarded as Prisma Data Platform credit, and deliberately leaves the fulfilment mechanics open.

Engineering changes

  • New game-kit.tsx extracts what all six games previously duplicated: the phase state machine, score refs with banking on mid-game quit, hi-score tracking, the clamped-delta rAF loop, held-key tracking that clears on window blur, and the shared HUD/overlay shell. Each game file now contains only its own simulation, drawing, and input.
  • Bug fixes found in review: Snake's unclamped frame delta (instant death after a tab switch), Stacker's potential infinite loop on zero-width touch drag and its drifting O piece, Invaders' stuck touch glide and hard-coded explosion timing, Meteors' respawn soft-lock and unsafe mid-loop array mutation, stuck keys after alt-tab in every held-key game, and Space now restarts every game after game over.
  • Simplified: the coin/credit gating and Konami code are gone, so every game is free play; the games open through one accessible dialog instead of a hand-rolled overlay; animations are silenced under prefers-reduced-motion.

Testing

  • pnpm --filter site check and types:check pass, and a production next build succeeds with /arcade prerendered.
  • Played every game in the browser: start, scoring, death, restart, and dialog close verified for all six. Leaderboard claim flow and persistence verified across reloads.
  • No console errors from the page.

Notes for reviewers

  • Scores are per-browser until the leaderboard backend exists; the contest should not go live before that lands.
  • The page currently uses the default OG image; a dedicated /arcade OG asset can follow separately.

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview Aug 12, 2026 10:39am
docs Ready Ready Preview Aug 12, 2026 10:39am
eclipse Ready Ready Preview Aug 12, 2026 10:39am
site Ready Ready Preview Aug 12, 2026 10:39am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ce0bbfad-ac3b-4e62-84a0-626cccb9504e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@argos-ci

argos-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Awaiting the start of a new Argos build…

Restyle /arcade on the Eclipse design system with the standard site nav
and footer, feature Comet Cat in the hero next to a top-ten leaderboard
with initials entry and the $500-Prisma-credits prize callout, and move
the other five games into a compact dialog grid. Extract the shared
game scaffolding (phase machine, score banking, clamped rAF loop, held
keys, HUD/overlay shell) into game-kit.tsx and fix the input, cleanup,
and timing bugs found in review. Scores stay in localStorage until the
global leaderboard backend lands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bring back the original neon takeover look (starfield, grid floor, CRT
scanlines, pixel type, ticker, no site chrome) on top of the polished
structure: Comet Cat stays the featured game beside the hall-of-fame
leaderboard with initials entry and the $500-Prisma-credits prize
callout, and the other games remain in the cabinet grid opening into
retro-styled dialogs. The game kit and gameplay fixes are unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add a fullscreen toggle to the shared game shell so every game, led by
Comet Cat, can be played full screen with the canvas scaling to the
display. Make the hall of fame compact: top three by default with a
top-ten expander that auto-opens when a claim lands below the fold, and
move its storage behind async fetch/submit functions that become the
global leaderboard API calls when the backend lands. Quiet the landing
view down so Comet Cat is the single focal point: static title, one
line of hero copy, slower ambient animation, no CRT flicker, dimmer
ticker and leaderboard chrome, plus an explicit back-row link so the
other five games are still discoverable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants