Inspiration
Every Twitch channel is a community with its own personality, but those communities almost never meet. Polls, predictions and chat games all stay inside one channel. We wanted one live event that many channels play together, where the fun is in finding out how different each community is.
Our first version scored points for matching the majority. Everyone converged on the obvious answer and it got boring fast, so we flipped it: the most popular answer is the one to avoid.
What it does
Oddstreams is one live game played on many Twitch channels at once. Each channel plays as a team, the streamer and their chat, against every other channel.
- Every channel gets the same opinion question at the same moment, with no right answers, only popular ones.
- The streamer and the chat answer separately by typing a number in chat. The chat's answer is its most popular pick.
- Everyone who picked the most popular answer joins the Mainstream. A channel stays in while its streamer or its chat is still odd.
- The last channels still odd are the day's Oddstreams.
Streamers add one browser source to OBS: a full overlay or a corner widget, invisible until they play. Every channel gets the same overlay, so every stream looks like one game show. A bot posts each question and result in chat. Judges can try it with a 3-minute demo against simulated channels.
How we built it
Oddstreams was built in one Codex thread, spec first:
- Every feature has a spec of numbered behaviours, and an AGENTS.md file sets the rules Codex worked by: code style, testing, and what never to commit.
- Codex built it in milestones. Each one ended with lint, typecheck, tests and a production build passing, a build-log entry and a commit.
- Tests play whole matches through the public HTTP, WebSocket and Twitch seams with a fake clock: over 160 Vitest tests and 30 Playwright journeys. No test ever calls Twitch.
- Claude Code tested each commit in the browser and on live Twitch, and sent findings back into the Codex thread to fix. Claude also drafted the question bank.
Stack: Node.js 24, TypeScript, Fastify, WebSockets, React, SQLite, Twitch OAuth, EventSub and the Helix API.
Challenges we ran into
- Keeping chat input alive. Our EventSub watchdog fired at exactly Twitch's keepalive interval, so the connection dropped every few seconds and wiped votes. We added a margin and made brief drops keep their votes.
- Fairness across channels. Stream delay and clock differences mean a vote can be typed in time but arrive late. The game uses a shared lock with a 5-second grace period, and the server measures Twitch's clock offset continuously and corrects for it.
- One source of truth. The game runs only on the server. Every overlay and panel receives full snapshots with the server's time, so screens never drift apart, even after a reload.
- Readable on stream. Overlay text has minimum sizes enforced by tests, so viewers can read it at 720p.
What we learned
Chat is a messy input device, and simple wins: a vote is just a number. And the best game design change we made was turning the streamer and their chat into a team, because one can carry the other.
What's next
The daily event is already built: streamers opt in from their own chat with !odd join, and the game starts at 7:00 pm ET with a public board and results. Next comes splitting vote collection into separate processes for thousands of channels, and more questions.
Built With
- codex
- eventsub
- fastify
- node.js
- react
- sqlite
- twitch
- typescript
- vite
- vitest
- websockets