Inspiration
Twitch chat is usually watching the game from the outside. I wanted to turn that around and make the audience part of the horror itself.
The idea behind ChatHaunt is simple: what if viewers could decide when the game becomes more dangerous, darker, or scarier while the streamer is still playing?
Instead of building a traditional Twitch chatbot, I wanted Twitch chat to become an input system for an actual game.
What it does
ChatHaunt is a first-person horror experience built in Unity where Twitch viewers can influence gameplay in real time.
The streamer explores a compact horror house while Twitch chat can trigger or vote for different events.
Viewers can:
- Send
!lightsto cut the lights throughout the house, forcing the player to rely on their flashlight. - Participate in 15-second chat votes.
- Vote for a blackout.
- Vote for a GhostWoman scare with a scream.
- Vote for a spatial door-creak scare.
The streamer has a local ChatHaunt dashboard showing the Twitch connection, Unity connection, vote status, vote counts, winning event, and game light state.
When a vote finishes, the winning event is automatically sent into Unity and triggered in the game.
How it works
The live path is:
Twitch Chat → Twitch EventSub → Node.js → localhost bridge → Unity → horror event
Twitch EventSub listens for channel.chat.message events over WebSocket.
A Node.js bridge processes the chat messages and voting logic. The bridge communicates with the Unity game locally, where the selected horror event is triggered.
The dashboard gives the streamer a simple way to monitor the connection and start a 15-second audience vote.
ChatHaunt intentionally uses ordinary Twitch chat voting rather than requiring a Twitch Extension or native Twitch Poll. This means the core interaction can work for regular Twitch broadcasters as well as larger channels.
How I used OpenAI Codex
OpenAI Codex was used throughout the build.
I used Codex to help create and iterate on:
- The Twitch EventSub integration.
- OAuth authentication and chat-message handling.
- The Node.js-to-Unity bridge.
- The live streamer dashboard.
- The viewer voting system.
- Unity gameplay scripts and horror event triggers.
- Lighting and blackout behaviour.
- GhostWoman integration and reset behaviour.
- Door interaction and audio events.
- Automated Node tests and debugging.
Codex also helped test the project while it was being built, diagnose problems, verify the real Twitch-to-Unity path, and prepare the repository and documentation for judging.
Challenges
One of the biggest challenges was making several different systems behave like one reliable real-time experience.
A Twitch message needs to reach EventSub, be processed by Node, travel through the local bridge, reach Unity, trigger the correct event, and then leave the game ready for the next interaction.
Authentication was another challenge. Twitch access tokens expire, so the project needed a clean reauthorization process without exposing credentials.
I also investigated using Twitch's native clickable polls. Native Twitch polls are restricted to Affiliate and Partner broadcasters, so I kept ChatHaunt's own chat-voting system instead. This allows viewers on an ordinary Twitch channel to participate by simply typing a vote number in chat.
Accomplishments
The most important milestone was seeing a real Twitch message travel all the way from Twitch chat into Unity and change the game.
ChatHaunt now has:
- A real Twitch EventSub connection.
- Real Twitch chat controlling Unity.
- A working audience voting system.
- A live monitoring dashboard.
- Multiple reusable horror events.
- Automated Node tests.
- A documented public repository that judges can run themselves.
The project demonstrates more than a single horror-game mechanic. The bigger idea is a reusable interaction layer where Twitch audiences can influence events inside games while the streamer is playing.
What I learned
This project taught me a lot about Twitch EventSub, OAuth, WebSockets, real-time event handling, Unity integration, and designing interactions around a live audience rather than just a single player.
It also showed me how useful Codex can be when building across several technologies at once. ChatHaunt combines Twitch APIs, Node.js, browser UI, networking, C#, and Unity, and Codex helped me move between those pieces while keeping the full system working.
What's next
The horror game is the demonstration, but the longer-term idea is bigger.
I would like ChatHaunt to become a reusable toolkit that game developers and streamers can connect to different games, letting them map Twitch audience actions to gameplay events without rebuilding the Twitch integration every time.
That could turn chat from spectators into active participants across many different types of streams and games.
Log in or sign up for Devpost to join the conversation.