Chaos Factory turns Twitch chat into an automatic physics game show. Viewers type !join to enter as named participants or support a team, then watch eight minigames unfold. They can race each other, compete in teams, or take on the streamer. Each round has its own winner.

I was inspired by marble races, physics machines and the suspense of watching a small collision change everything. I wanted to bring that feeling to Twitch while keeping participation simple. Stream delay makes precise controls frustrating, so joining is the only chat command players need. The entertainment comes from watching their names become part of the action: marble streams multiply, race leaders break gates open for the chasing pack, and a bomb changes hands just before exploding.

I built the project through a specification-and-feedback loop with Codex, using GPT-6.1 Sol. I supplied Markdown specifications, directed the design, tested builds and gave feedback. Codex implemented the application, including the game engine, eight minigames, procedural visuals, sound effects, Twitch connector, dashboard, tests and recording tools.

The application uses TypeScript, PixiJS and deterministic Rapier physics. Games run at a fixed 60 Hz, with seeded randomness so the same setup can reproduce a round. A Fastify and WebSocket server connects the show to Twitch through Twurple and EventSub. Authorization stays on the server. Mock mode provides delayed simulated viewers, allowing development and offline testing without an audience or Twitch credentials.

The hardest challenge was making the games engaging to watch. Early prototypes had empty arenas, repetitive action and unclear outcomes. I cut weaker ideas, rebuilt layouts and focused on readable physical events, visible multipliers, natural endings and opportunities for comebacks. The presentation also evolved into a shared Toy theme with bold colors, chunky geometry and readable names.

Built With

  • codex
Share this project:

Updates

Submission history