Inspiration
Twitch chat is usually a spectator. I wanted the audience to become the boss designer and the streamer's opponent, with a reason to keep participating after the fight begins.
What it does
Chat votes on a duck, dog, or cat boss, its attack, and its weakness during a 30-second build phase. The streamer then has 60 seconds to survive or defeat it. Viewers continue voting on attack patterns and wildcards throughout the fight. At half health they choose a permanent mutation. More unique participants unlock two stronger evolution stages, with denser patterns, faster attacks, and shorter warnings. The result distinguishes defeating the boss, surviving the timer, and being knocked out.
How I built it
The game is a browser-based arena with animated creature forms, projectile combat, voting windows, and a stream view for capture software. It connects to the broadcaster's Twitch chat with OAuth and EventSub WebSocket using the user:read:chat scope. A simulated chat mode makes it possible to practice and demo the mechanics. I used OpenAI Codex to implement and refine the Twitch connection, game state, chat commands, voting, evolution, combat patterns, interface, and tests.
Challenges and what I learned
The central challenge was making chat influential during combat without taking control away from the streamer. Short recurring votes, limited helpful wildcards, and a half-health mutation give viewers decisions across the full round. Testing with one Twitch account also made the distinction between real chat voting and simulated crowd participation important, so the demo labels practice footage clearly. The Twitch connection reads chat and keeps access tokens in tab memory; it does not post to chat.
What’s next
I’d like to add clearer feedback when a live vote is accepted, richer boss animations, and more ways for smaller streams to reach evolution stages.
Built With
- css3
- html5
- javascript
- openai-codex
- twitch