What it does
Twitch chat captains a cricket chase. Viewers type !drive, !pull, !sweep, !defend or !six. Each person gets one vote per ball and can change it until voting closes. The shot with the most votes faces the delivery, and everyone who voted for it gets that ball's runs as personal MVP credit (team runs count once). A raid opens a Super Over, a cheer arms a Free Hit, and a "DRS" channel-point reward can reverse a wicket. An OBS browser-source overlay shows the target, the live vote tally, the ball-by-ball result and the final "CHAT WINS!" card. No cricket knowledge needed: the overlay shows the equation.
How it connects to Twitch
tmi.js reads chat (the demo ran in anonymous read-only mode on channel kulrajsingh609). EventSub adapters for cheers, raids and rewards are implemented and covered by local protocol tests, but were not exercised live in the demo.
How I used Codex
Codex (thread 01a17995-b816-76d3-9463-0d48a4971357, 2026-10-27) built the first full version from my SPEC.md: the game engine, overlay, control room, mock chat, Twitch IRC/EventSub adapters, tests and README. Two follow-up Codex threads added the scripted showcase, control-room redesign, match scheduling, DRS recovery and the browser/integration tests. Later regression fixes and the live-chat test were done outside Codex. The game does not call an LLM at runtime; commentary is templated.
Challenges
A successful DRS review after an all-out must restart play, and a reset must cancel old timers; EventSub shutdown and reconnect had to be bounded. Local tests cover these.
Honest limits
In the demo the votes were typed by me from my own account, not by an audience. Captured as a browser window, not an OBS capture. No audience or engagement numbers are claimed. 92 tests pass on a fresh clone.
Try it
npm install, npm start, open http://localhost:3000/mock, click "Play the showcase" (labelled scripted rehearsal), then "Reset to manual play" and type !drive / !six. To connect Twitch see README "OBS setup".
Built With
- css
- html
- javascript
- node.js
- openai-codex
- tmi.js
- websockets