Inspiration

Twitch audiences can do far more than vote in a one-off poll. What if a streamer could transform their chat into a cooperative party whose decisions changed a fantasy adventure in real time? We built CrowdQuest: The Ember Gate to give each viewer an understandable role and turn participation into a shared story.

What it does

CrowdQuest is a Twitch-chat-controlled multiplayer fantasy RPG. Viewers type !join to become adventurers, choose a Warrior, Guardian, Healer, or Scout with !role, vote for different routes with !path A or !path B, and commit class-specific !act commands during encounters and the final fight against the Ember Lord.

Those actions are meaningful. The TypeScript quest engine validates the player and phase, calculates votes and combat outcomes, and updates shared health, supplies, threat, and each hero's contributions. A balanced four-class party earns a Formation bonus; coordinated scouting and fighting can improve an attack. The streamer can start, pause, advance or reset a quest, choose difficulty and turn duration, and trigger Rally or Emberstorm events.

The game displays its authoritative state in synchronized streamer dashboard, spectator view, transparent OBS overlay, and dedicated 1920×1080 recording layout. Original animated fantasy environments, class visual effects, story chapters, battle results, a quest chronicle, and participation indicators make chat's impact easy to see.

How we built it with OpenAI Codex

We used OpenAI Codex as part of the iterative development process for the React/Vite interface, the TypeScript game engine, the Node.js/Express server, Twitch OAuth/EventSub WebSocket integration, Socket.IO synchronization, OBS layouts, automated tests, and documentation. Development involved implementing features, reviewing changes, testing game rules and HTTP flows, and improving UI and security. The required Codex session ID and genuine Codex footage are supplied separately as competition evidence.

Twitch integration: the server authorizes the broadcaster via Twitch OAuth, subscribes to EventSub channel.chat.message, applies real chat commands through the same validated game engine as the development simulator, and broadcasts resulting game state via Socket.IO. OAuth credentials and control tokens remain server-side.

Tech stack: TypeScript, Node.js 22, Express, React, Vite, Socket.IO, Twitch OAuth, Twitch EventSub WebSockets, custom CSS/SVG, Web Audio, Vitest, GitHub Actions, and Render.

Challenges

The main challenge was combining unpredictable live chat with deterministic, fair gameplay. We implemented role and phase validation, one stored vote/action per player, rate limiting, reconnection states, server-authoritative calculations, and protected streamer controls. We also kept simulated rehearsal explicitly distinct from genuine Twitch activity, so test footage cannot be mistaken for live viewers.

Accomplishments

  • Complete branching cooperative quest with four classes, roles, abilities, shared resources, team synergies, boss battle, and an outcome.
  • Multiple synchronized visual experiences designed for Twitch and OBS, including cinematic scenes and a server-confirmed command receipt feed.
  • Secure Twitch OAuth/EventSub integration and a playable simulator for development and testing.
  • Automated engine/UI tests, TypeScript validation, dependency audit, production build, and full-game HTTP smoke tests.
  • A publicly accessible polished six-chapter Showcase, generated from actual deterministic game states and clearly marked as simulated.

What's next

More adventures and enemy types, persistent hero progression, streamer personalization, configurable community challenges, and richer co-op strategy.

Try it and inspect the source

The hosted Showcase is a simulated exploration of the game's scenes—not a live Twitch test. Running the real Twitch-controlled version requires broadcaster authorization and private Twitch developer credentials.

Built With

Share this project:

Updates