Inspiration
What if Twitch chat could become the crew of a spaceship—and every decision mattered?
Twitch brings people together around live experiences. We wanted to turn that connection into a shared adventure where viewers do more than watch: they make decisions, discover secrets, and shape an ending together.
That idea became StreamQuest AI, a space adventure that combines Twitch chat participation, persistent story memory, and a streamer-controlled experience.
What it does
The streamer hosts. The community chooses. The adventure remembers.
StreamQuest AI takes viewers through a five-chapter expedition aboard the Aurora. With oxygen running low and mysterious signals appearing, chat must decide how the crew responds.
🚀 Chat becomes the crew
Viewers vote directly in Twitch chat using !a, !b, or !c. Votes update in the host dashboard and the dedicated OBS overlay, making participation visible on stream.
✨ Every choice has consequences
When voting closes, an animated Choice Consequences Reveal shows:
- The winning action and exact vote totals.
- Changes to oxygen, energy, and chaos.
- New discoveries added to the adventure’s memory.
Earlier decisions influence later chapters. Repairing life support, helping an engineer, or mapping navigation can affect future resources and story details.
🎛️ The streamer stays in control
The next chapter appears privately for host review. Viewers remain on the current scene until the streamer approves the next one, keeping the adventure ready for a live audience.
🌌 An experience designed for the stream
A colourful, space-themed dashboard supports the host, while a separate read-only OBS overlay gives viewers a focused presentation of the story, choices, and results.
How we built it
We built StreamQuest AI around a backend that manages game state and a lightweight frontend that presents the adventure.
| Layer | Technology and purpose |
|---|---|
| Backend | Python and aiohttp for application routes, Twitch integration, and game controls |
| Persistence | SQLite for saved adventure state |
| Frontend | HTML, CSS, and JavaScript for the dashboard and overlay |
| Twitch connection | OAuth and EventSub for authenticated chat participation |
| Broadcast presentation | OBS Browser Source for the viewer-facing overlay |
| Development | OpenAI Codex for implementation, debugging, tests, and documentation |
The backend is authoritative: it validates votes, resolves rounds, applies resource changes, and controls chapter progression. The dashboard and overlay display that shared state.
The adventure runs with prepared story content. An optional AI-compatible story API can enhance narration, while game rules and resource calculations remain controlled by the engine.
Building with OpenAI Codex
After creating the initial prototype, we used OpenAI Codex to develop and refine substantial parts of the project:
- Implementing the Choice Consequences Reveal.
- Synchronizing results between the dashboard and OBS.
- Improving overlay styling, responsiveness, and connection labels.
- Developing tests for voting, permissions, persistence, and story continuity.
- Preparing setup instructions and verification documentation.
We reviewed changes, tested locally, and checked the experience using real Twitch chat and OBS. Our demo includes the actual Codex development thread alongside the working application.
Challenges we ran into
Keeping every display consistent
Twitch messages, dashboard actions, and OBS refreshes arrive at different times. We needed a single authoritative result so that resource changes apply once and both displays reflect the same outcome.
Protecting the next chapter
The host needs to review the upcoming scene without revealing it to viewers. We separated the private draft from the public state and kept chapter progression behind explicit host approval.
Making results trustworthy
A result should accurately explain what happened. We handled duplicate events, vote replacement, ties, and zero-vote rounds. Resource changes also reflect the actual effects applied, including earlier story bonuses and resource limits.
Testing beyond the development environment
Some checks were blocked by socket and browser restrictions in the development environment. We documented those limits and ran the complete Python suite on a local Mac, where all 27 tests passed.
Accomplishments that we're proud of
- Real Twitch participation: chat commands control a working adventure.
- A complete story loop: voting, consequences, host review, and chapter progression work together.
- Meaningful continuity: earlier discoveries influence later moments.
- Clear on-stream feedback: viewers can see choices, totals, and consequences.
- A distinctive visual identity: a dreamy space design connects the dashboard and OBS overlay.
- A live demonstration: StreamQuest AI was shown broadcasting on Twitch.
- Codex-assisted development: implementation and testing are supported by a genuine development thread.
What we learned
Audience participation becomes more meaningful when the experience remembers it.
A vote creates an immediate interaction, but seeing its consequences in a later chapter gives the community a shared history.
We also learned that live experiences depend on careful engineering. Timing, reconnection, persistence, and accurate status messages all contribute to whether a streamer can trust the tool.
Working with Codex reinforced the value of clear tasks and verification. Generated changes became useful through review, automated checks, and hands-on testing with Twitch and OBS.
What's next for StreamQuest AI
We want to make StreamQuest AI easier to start, richer to replay, and more adaptable to different communities.
- New adventure themes: expand beyond the Aurora expedition into fantasy, mystery, and other settings.
- Deeper story memory: give earlier decisions more influence over relationships, discoveries, and endings.
- Simpler streamer onboarding: make Twitch connection and OBS setup easier.
- Customizable overlays: offer layouts and colours that fit each channel.
- Collaborative adventures: explore shared expeditions across Twitch communities.
- Richer AI narration: expand optional narration while preserving reliable rules and host approval.
Our goal is simple: turn Twitch chat into a community that builds a story together—one choice at a time.