Inspiration

Interactive adventures thrive on audience participation, but a streamer must also run the game, track resources, interpret chat, and keep the story moving. RIFT explores whether audience decisions can become coherent encounters without taking control away from the host. This is a product hypothesis; streamer research has not yet validated it.

What it does

Viewers vote on three Ruined Temple outcomes using simple Twitch chat commands. An original deterministic encounter engine checks health, level, active hazards, cooldowns, and allowed variants. It proposes a bounded result with an inspectable calculation. The broadcaster approves or rejects the consequence; approval updates the OBS browser-source scene and an audit ledger. A compensating rollback can undo the latest approval while preserving evidence.

How we built it

React, TypeScript, Vite and Tailwind provide the control room and overlay. Fastify owns state and authorization. Twitch uses server-side OAuth and EventSub WebSockets. SQLite transactions persist votes, proposals, approvals, and evidence. Native WebSockets distribute authoritative snapshots. Vitest checks rules, persistence, authorization, and mocked Twitch protocol behavior; Playwright exercises the full local loop and mobile interface.

Challenges we ran into

Codex was used in this primary build chat to interpret the specification, implement the software, consult Twitch documentation, run checks, investigate failures, refine the interface, and prepare documentation. Include the actual session identifier and genuine development footage before submission.

Accomplishments that we're proud of

The audience never holds the keys. Chat can choose a fate, but only the streamer can make it real. Under test, 64 simultaneous approvals produced exactly one state change, and 32 competing rollbacks produced exactly one undo.

Every outcome is explainable. The same party always gets the same answer, and RIFT shows the sums behind it before anything happens. A 300-round simulated campaign kept health and inventory within bounds.

It held up under heavy load. A local stress test of 20,000 votes from 10,000 simulated viewers, with 64 overlays connected, finished with zero errors at about 1,067 votes per second and a p95 response time of 106 ms. Finding and fixing a bottleneck made throughput 6.1× faster.

These are single-run local measurements, not a capacity guarantee. It tells the truth about itself. Simulated votes are labeled on screen, rehearsal and live events stay separate in the ledger, and the app warns when a dropped connection may have cost votes.

It looks like the world it describes. The overlay is a living painted scene, and approving an encounter tears it open onto that encounter’s artwork.

What we learned

The line between a proposal and a commitment is the whole product. Once audience input could never change state directly, approval, rollback and the ledger all became simpler to build and easier to trust.

Real-time systems fail in the gaps. Votes can arrive late, twice or out of order, and reconnecting doesn’t bring back missed messages. The safe answer was to store the source of every vote, reject stale ones and make any gap visible.

Load testing finds what code review doesn’t. Our first stress run showed the server rebuilding the same snapshot for every client on every vote. Fixing that cut p95 latency by 82.6%.

A test proves only what it exercised. Mocked Twitch tests can pass while real delivery remains unproven, so we keep those two claims separate.

Demos need guardrails too. Clicking through every button in every state found controls that were technically correct but easy to misuse on stage, like a reset that could silently wipe a rollback.

What's next for RIFT

Prove it live. Run full rounds with real viewers and a real OBS scene, including dropped connections and expired tokens.

Test it with streamers. We need to find out whether this actually helps them, and whether the encounter balance feels fair in play.

Bring campaign tools into the control room. Pause, cancel, potions and rest already work on the server but don’t have buttons yet.

Build more of the world. Add encounters and chapters beyond the Ruined Temple, and let streamers write their own within the same rules.

Fit more stream layouts. The overlay is a full-frame scene today, so a transparent lower-third would let RIFT sit on top of gameplay.

Built With

Share this project:

Updates

Submission history