Drift Party
activeA local-and-online arcade racer where the screen is the track and every phone is a wireless controller. Open the game on a laptop or TV, and up to three friends join by scanning a QR code or typing a six-character room code โ the host races on the keyboard, and any empty slots fill with AI. Pick a car, ready up, and drift around the Oval Circuit or the Junkyard 8.
The interesting part is the networking. Phones and screen never talk directly: each opens a WebSocket to a single Cloudflare Worker, and a Durable Object acts as the room โ assigning player slots, tagging each phone's inputs, and relaying gas/brake/steer to the screen at the edge. Because everything flows through the Worker instead of peer-to-peer, it connects reliably across any network with nothing to install and no third-party broker. Idle rooms hibernate, so they cost nothing when no one's playing.
The whole thing is one deployable: a Vite + TypeScript front-end (a tight canvas game loop for the screen, touch controls for the phone) served as static assets by the same Worker that hosts the rooms.