Inspiration

The most memorable streaming moments are shared decisions: the risky play, the instant regret, and the comeback. We wanted chat to own all three, without installing another app or leaving the stream.

What it does

Chat Heist turns Twitch chat into the crew of a three-act orbital heist. Viewers type commands to choose an approach, steal from a vault, and escape. Every choice changes a visible loot total and security heat. Reaching extraction at 80 heat or above means capture. Between decisions, a majority of the previous round's voters can use !rewind to restore the exact previous state. The crew gets only one rewind per run.

The host controls pacing, pause and vote locking. Practice mode labels local rehearsal inputs. Stream view is designed for OBS Window Capture. Viewers need no installation.

How we built it

OpenAI Codex helped develop the behavioral contract, deterministic JavaScript engine, procedural Canvas scene, responsive interface, Twitch EventSub adapter and automated tests. The engine is independent of the browser and transport. The app runs locally on Node.js, with no runtime package dependencies. Twitch OAuth requests user:read:chat only; tokens stay in browser memory. There is no bot posting, moderation access or in-game AI service.

Challenges

A rewind must undo consequences without duplicating rewards. We snapshot heat, loot, stage and the previous round's electorate before applying a decision. Rewind consumes its single resource and restores that snapshot. The adapter deduplicates EventSub deliveries before counting votes. A disconnect pauses the round instead of switching silently to simulated chat.

Accomplishments

Twelve automated tests pass, covering vote replacement, pause and zero-vote behavior, deterministic outcomes, exact rewind restoration, voter eligibility, EventSub deduplication, subscription rejection and revocation.

The video shows actual Twitch messages from vipomc16 driving a complete run: !blast, !overload, !rewind, !cloak, !drift. Rewind restores 36,000 credits and heat 48; the alternative route ends with 46,000 credits and heat 20. The channel was offline and one participant performed the walkthrough. This proves real chat integration, not a live broadcast or a tested large audience. The video also shows the actual Codex workspace and tests; its English narration uses a synthetic system voice.

What we learned

An audience mechanic needs an honest state model as much as a compelling visual. A zero-vote round should wait, practice inputs should be labelled, and connection status should reflect an accepted subscription. Those choices make the host experience predictable.

What's next

The next validation is a multi-viewer broadcast to test community pacing and usability. Additional heist scenarios can build on the deterministic engine without weakening the single-rewind rule.

Try it

Source, setup instructions and tests: https://github.com/adelch-git/chat-heist

Run locally with Node.js, open the app, and connect your broadcaster account for Twitch mode. Practice mode is available for rehearsal.

Built With

Share this project:

Updates

Submission history