Inspiration

A crowd's mistake can be the most memorable moment on stream. Rewind Rescue makes that mistake playable: the failed route stays visible as a ghost while chat gets one chance to change the ending.

What it does

Viewers steer one rescue ship with !left, !right and !shield. Every two seconds, each viewer's latest command counts once; ties hold. A collision opens a six-second rescue window. The round's single !rewind restores five seconds of play and leaves a violet ghost of the failed route, so the crew can see its old decision and choose a new path toward rescue.

The streamer controls start, pause and reset. A separate transparent overlay page (usable as an OBS browser source) shows votes, connection state and the changed route. Reduced motion is available. Local MOCK and REPLAY modes are clearly labeled synthetic rehearsal tools, separate from the TWITCH mode shown in the demo.

How we built it

A local Node.js server owns a deterministic game engine and synchronizes the controller and overlay. A bounded snapshot history supports rewind, while a one-use flag prevents a rewind from restoring itself. The Twitch adapter receives channel chat through EventSub over WebSocket (channel.chat.message) using a read-chat-only browser authorization; no client secret is used, the credential stays in the controller browser's memory, and only normalized commands reach the local game server. The running game makes no AI inference calls.

How we used Codex

We directed the game idea and decisions; OpenAI Codex implemented the engine, ghost artwork, relay, input adapters, OAuth flow, tests and setup documents in the build thread (session 01a187d3-8efd-7611-8df3-80355e9b0990). One concrete improvement was OAuth recovery: a review reproduced a denied login stuck at "connecting". Codex cleared the pending authorization and added regression coverage for denial, invalid state, abandoned popups and successful retry (commit ed31ba6). The video shows the thread, that diff and the 42 passing tests.

Challenges and what we learned

Rewind must restore the ship and shield, clear old votes and still remember that its one use is spent. Connection loss must pause visibly rather than leave chat steering a game it can no longer affect. Synthetic fixtures check these boundaries, but real Twitch testing still found three issues the mocks hid (an unbound fetch call, EventSub metadata ids containing base64 characters, and too little keepalive slack); they were fixed in commit ee3d898 before recording.

Live validation

Tested Nov 1, 2026 on the Twitch channel northstar_trustrail: after authorizing, the controller showed "TWITCH · connected"; real chat messages !right and !left moved the ship; in the recorded round a collision opened the rescue window, !rewind rolled the route back with the violet ghost, and !right then !left led to "Rescued!". Commands were typed by the broadcaster account in its own chat (one person demonstrating the route, not audience turnout). The overlay was shown in a browser window, the same page used as an OBS browser source.

Current limits and next steps

This is a local demonstration with original canvas art. Tests do not establish large-audience performance. More levels and broader user testing are future work.

Built With

Share this project:

Updates

Submission history