Inspiration

Most Twitch interactions sit beside the content: a poll, alert, or chat box. We wanted the audience inside the horror without taking the game away from the streamer. NightShift Live separates audience agency from streamer agency, then forces both to coexist in one persistent world.

What it does

NightShift Live: The Ward is a five-act cinematic Twitch survival-horror game. The streamer explores Reception, Ward 06, the Operating Theatre, the Generator Room, and the final exits; investigates evidence; manages inventory; solves physical puzzles; counters the Warden; and earns the ending.

Chat controls a parallel layer. Viewers vote with displayed commands and join Guardian or Chaos factions. Winning choices can restore or kill lights, create resources, reveal evidence, change danger, alter routes, and move the Warden through distinct phases. The audience changes the conditions, but it cannot press the streamer's physical action buttons. If nobody votes, the game announces a clearly labeled DIRECTOR FALLBACK instead of inventing participation.

The production capture proves the loop with a genuine separate viewer: bigtestingbot: !restore arrives through live Twitch EventSub, counts once as 1 verified vote, restores corridor power, retracts the isolation latch, and opens the route to the Operating Theatre.

How we built it

NightShift uses browser-native JavaScript modules and a deterministic campaign engine. The Twitch bridge handles OAuth, Helix identity validation, and EventSub WebSocket events for chat, follows, subscriptions, cheers, and raids. It validates state, deduplicates event IDs, monitors keepalives, handles reconnects, and keeps simulated input visibly separate from authenticated input.

The cinematic renderer is a UI-built 2.5D compositor. Original room plates combine with independent fog, lighting, reflections, doors, breakers, props, routes, and the Warden. BroadcastChannel and a loopback relay transport sanitized state to passive gameplay and OBS overlay views without creating a second controller or doubling audio. Web Audio generates directional, bus-mixed sound with synchronized visual captions.

How Codex was used

OpenAI Codex was the primary build partner for campaign design, interaction systems, original asset integration, Twitch lifecycle hardening, deterministic game logic, responsive UI, audio and captions, accessibility, automated browser gates, release optimization, adversarial truth auditing, and the evidence pipeline.

Primary Codex session: 01a1976e-d289-7a22-9e87-7aefa57d3379.

Challenges

  • Preserving meaningful streamer agency while allowing chat to physically change the world.
  • Making EventSub behavior deterministic across reconnects, duplicates, optional subscriptions, and quiet chat.
  • Synchronizing the authoritative game, passive gameplay mirror, and OBS overlay without doubled controls or audio.
  • Keeping cinematic horror readable at Twitch scale and accessible under reduced motion, reduced effects, zoom, keyboard, and caption requirements.
  • Ensuring simulated fixtures could never be mistaken for genuine Twitch participation.

Accomplishments

  • A complete five-act campaign with persistent state and earned endings.
  • Real Twitch votes that visibly change power, doors, danger, resources, routes, and Warden behavior.
  • Clear separation between viewer consequences and streamer-only physical actions.
  • A transparent passive OBS route, streamer production console, captions, a four-bus mixer, accessibility controls, and truthful live/simulated provenance.
  • 168 passing tests, one intentional Windows symlink skip, and zero failures on the exact public release.

What we learned

Interactive streaming works best when the audience can change the pressure without replacing the player. Broadcast reliability also depends on truthfulness: a quiet-chat fallback is useful, but it must never pretend to be a real viewer.

What's next

Next steps include authorization-code OAuth with PKCE, encrypted refresh-token storage, signed multi-device sessions, moderation and rate controls, creator analytics, and a content system for new hospitals, factions, routes, and streamer-authored episodes.

Play it: https://nightshift-live-ward.chinnaaa-2023.chatgpt.site/
Source: https://github.com/kingqueen43211-svg/nightshift-live-the-ward

Built With

  • broadcastchannel
  • chatgpt-sites
  • css3
  • html5
  • javascript
  • node.js
  • obs-studio
  • openai-codex
  • playwright
  • server-sent-events
  • twitch-eventsub
  • twitch-helix-api
  • twitch-oauth
  • web-audio-api
Share this project:

Updates

Submission history