Inspiration
The best Twitch moments happen when viewers help create the story. I wanted to take that participation beyond voting and let chat change the rules of the game itself.
That became Patch Party: a survival arena where the streamer plays the hero and the community proposes the next plot twist.
What it does
The streamer has three minutes to survive, collecting green sparks and avoiding orange drones. Meanwhile, viewers join Builders or Chaos Crew and propose temporary changes using commands such as:
!patch flip gravity!patch make the drones giant!patch give us a shield
Each suggestion becomes a proposal that the streamer can approve or dismiss. Eight supported mechanics affect gravity, movement, jumping, player size, enemy size, and protection.
Every deployed patch credits its author. Changes expire automatically, and the streamer can pause or undo them. A separate stage window provides a clean view for broadcast capture, while the run recap records the community’s contributions.
How I built it
I used OpenAI Codex throughout development to implement and refine the game engine, interface, patch system, Twitch integration, tests, and deployment.
The application uses TypeScript and React, with original procedural artwork rendered through HTML Canvas. A fixed-step simulation keeps physics consistent as mechanics change.
The Twitch connection uses OAuth and EventSub WebSockets to receive chat messages. Tokens stay in browser memory. Viewer commands map to predefined mechanics through bounded phrase matching; they never execute arbitrary code, and the game has no runtime language-model dependency.
The public application runs on GitHub Pages. Its stage view synchronizes between windows in the same browser.
Challenges I faced
The hardest technical challenge was making changing rules feel surprising without making the game unpredictable to maintain. Reversed gravity, slippery movement, and different player sizes all affect collision behavior.
I addressed this with explicit conflict rules, automatic expiry, a four-patch limit, and tests for individual mechanics.
Another challenge was balancing audience participation with streamer control. Approval, dismissal, cooldowns, and undo became central features because a busy chat should create entertaining choices without overwhelming the host.
What I learned
I learned that audience participation needs both visible consequences and clear boundaries. Author credits make contributions feel meaningful, while temporary effects keep each decision manageable.
Working with Codex also reinforced the value of small, verifiable iterations: implement a mechanic, test its behavior, inspect it in the browser, and then combine it with other mechanics.
Accomplishments and next steps
Patch Party is publicly playable, its source is available on GitHub, and 20 automated tests pass.
The public demo uses clearly labeled simulated chat. Twitch OAuth and EventSub are implemented and covered by controlled protocol tests; real-channel end-to-end verification remains pending.
Next, I want to validate live Twitch interaction, run community playtests, and expand the mechanic library based on what streamers and viewers find most entertaining.
Patch Party, Your stream. Their rules.
Log in or sign up for Devpost to join the conversation.