Inspiration
Dead Circuit was born from a simple question: what if Twitch chat wasn't the audience, but the engineering crew? Most Twitch integrations treat viewers as voters or currency sources. I wanted something tighter, the streamer pilots a damaged ship through bullet hell asteroids, chat routes power through the hull to keep systems online. One ship. One circuit. Shared stakes. If the hull breaches, the pilot dies. If chat fails to route power, the exit stays locked. The fantasy: a damaged airframe limping through a hazard field, its crew,hundreds of voices in chat, frantically patching circuits while the pilot threads needle-thin gaps in the danmaku. Not a game with chat. A game for chat.
What it does
Dead Circuit is a cooperative Twitch-integrated arcade game: Pilot (streamer): WASD/arrows to dodge danmaku patterns in a 760×760 flight arena. Currently No shooting. Pure evasion. Engineering crew (chat): !b1 wire C3 LEFT RIGHT places or rotates wire tiles on a 7×5 routing grid. Power flows from source(s) to drive. AND-gate boards require both inputs powered before the gate output activates. Plane systems: 3 critical systems (Engine, Hull, Avionics), each with 4 damage states (Operational → Damaged → Critical → Destroyed). Pilot hits escalate a random system one level. Chat repairs with !repair hull using credits earned by powering boards. Loss: All 3 systems destroyed = total system failure. Win: All boards powered + pilot reaches the exit at the top of the arena. Danmaku: Three pattern families (aimed fans, radial rings, edge sweeps), no telegraphs. Fairness through slow projectiles, distinct colors, persistent gaps, and a visible collision core.
How we built it
Stack: Phaser 4 + TypeScript + Vite. Pure TypeScript game core (src/core/) with zero Phaser/Twitch dependencies. Power routing: Each tile has ports. A path exists iff there's a connected sequence from source to drive where adjacent ports match. AND-gate boards: two independent sources → gate inputs → gate output (only when both inputs powered) → drive. Latest write wins; overwriting an energized tile shorts (danger spike, flash, new orientation takes effect). Danmaku: Three families, no telegraphs. Aimed fans (alternating edges), radial rings (off-center emitter), edge sweeps (one gap). Speed/density scale with elapsed time. Collision: swept circle vs. swept circle with a small core radius. Twitch integration: Browser OAuth → EventSub WebSocket → channel.chat.message subscription. Per-viewer cooldown (0.85s base × Comms multiplier), global deduplication, command queue. Demo mode works offline. In-canvas UI: 3 system widgets (Engine/Hull/Avionics) with 4-state color coding, hit flash animations (120ms/200ms/180ms/300ms), repair status, exit indicator. All Phaser Graphics/Text — no DOM during gameplay.
Challenges we ran into
- The "AI-Gen" UI Trap Early versions used DOM for everything. It looked like a dashboard, not a ship console. The typography was generic (system fonts), panels were rounded cards, the danger meter was a smooth progress bar. It felt like a webpage, not a game. Fix: Moved all gameplay UI into Phaser. Chamfered panels via clip-path, CRT scanlines + vignette over the canvas, segmented LED danger meter (repeating gradient), signal-bar brand mark, phosphor color palette. Well, it still looks AI-Gen, but that's the best I can do without proper direct reference and design. Real fonts (Barlow Condensed + DM Mono) loaded via Google Fonts. CSS referenced 'Barlow Condensed' and 'DM Mono' in 15+ places but no or @font-face existed. Everything silently fell back to Arial/monospace. Fix: Added Google Fonts preconnect + link in index.html. Verified via document.fonts.
Accomplishments that we're proud of
Clean architecture: Game logic is 100% framework-agnostic. Unit-testable, portable, deterministic. Plane damage system: Emergent death spiral that feels mechanical, not arbitrary. Each hit degrades a specific capability the pilot feels immediately. In-canvas UI: Zero DOM during gameplay. Part widgets animate at 60fps, respect prefers-reduced-motion, readable at 720p stream size. Danmaku fairness: No telegraphs, but slow projectiles, distinct colors, persistent gaps, visible collision core. Feels fair, not cheap. Twitch integration: Real EventSub WebSocket with OAuth, reconnection, deduplication, per-viewer cooldowns. Demo mode works offline. Full-screen canvas: Scale.RESIZE handles any window size. No black bars, no fixed resolution.
What we learned
Separation of concerns isn't academic. The plane damage system was added in one afternoon because the state machine was already clean. If rendering/logic/networking were tangled, it would've taken days. Design systems need code, not just CSS. The "ship console" look required Phaser Graphics (chamfered panels, scanlines, vignette, corner brackets), not just styling. Chat commands must be readable at stream size. !b1 wire C3 LEFT RIGHT uses full direction words, not abbreviations. Coordinates are A-G / 1-5. No memorization needed.
What's next for Dead Circuit
Short Term:
Boss encounters: The current win condition (route all boards → reach exit) is a pure puzzle + dodge. Needs a confrontation, a capital ship, a rogue AI core, a reactor breach sequence. Multi-phase, telegraphs this time, mechanics that demand specific system states (e.g., "Engine must be Operational to outrun the closing blast doors"). Elite enemies: Fightable sub-bosses that target specific systems (EMP drones → Avionics, hull breachers → Hull, fuel leeches → Engine). Chat must triage repairs mid-fight. Campaign structure: 3-mission arc (Standard Routing → AND-Gate → Boss). Persistent damage between missions? Repair credits carry over?
Medium Term:
Visual polish: Sprite sheets for ship/bullets, particle systems for shorts/repairs, screen-space distortion on critical damage. Audio: Dynamic music layers (calm → tension → combat), distinct SFX per system hit/repair, voice lines for critical states. Accessibility: High-contrast mode, colorblind palette options, configurable difficulty (invuln window, pattern density, repair credit rate). Twitch Extensions: Overlay for viewers showing system status, repair queue, command cooldowns, without cluttering the streamer's screen.
Long term: Mod support: Custom boards, patterns, enemy types via JSON. Multi-ship co-op: Two streamers, linked circuits. One pilots, one manages internal systems. Shared repair pool. Tournament mode: Deterministic seeds, fixed seeds for speedrunning, replay system with ghost data.
Log in or sign up for Devpost to join the conversation.