Inspiration
Twitch chat can make a stream feel like a shared adventure. I wanted viewers to have meaningful roles without overwhelming the streamer with constant commands.
Checkpoint gives the game control over when participation happens, which actions count, and how the result changes play.
What it does
Checkpoint combines a reusable TypeScript SDK with The Last Beacon, an original playable expedition.
The streamer pilots a courier, collects fragments, and avoids storm strikes. At checkpoints, Twitch chat can:
- Choose a route that changes the next region’s hazards and salvage opportunities.
- Send a shield, healing, or a temporary speed boost.
- Cooperatively charge protection for the final crossing.
Participation windows show the commands, countdown, accepted inputs, and resolved outcome. Explicit crew presets support small audiences, while safe fallbacks keep the game playable without viewers. A separate read-only overlay displays the interaction state for broadcasts.
The SDK also works independently of the game. Its platform-independent core accepts generic participant inputs and handles timed choices, cooperative goals, vote replacement, pause/resume, deterministic results, and duplicate-input suppression. A minimal local-button example demonstrates another integration.
How I built it with Codex
I used OpenAI Codex throughout implementation and verification: building the interaction core, Twitch adapter, authoritative server, React interface, Canvas game, tests, and documentation.
The Twitch adapter uses broadcaster OAuth and EventSub WebSockets. The server owns game state and interaction timing, while privileged streamer controls require authentication.
Codex also helped diagnose a real integration problem: the host clock differed from Twitch’s clock, causing fresh messages to be rejected. It implemented timestamp normalization and added focused regression tests.
Challenges
The main challenge was making participation produce a reliable game consequence, rather than stopping at a vote count.
Repeated messages, duplicate deliveries, late inputs, pauses, and disconnections need explicit rules. Keeping those rules in one shared core prevents the simulator and Twitch paths from developing different voting behavior.
What I verified
Real Twitch route, shield, and cooperative commands worked through a complete winning run using the one-person crew preset.
The project passes 47 automated tests, TypeScript checking, lint, and its production build. Separate browser and simulated checks cover recovery, no-viewer play, failure/restart, and overlay permissions. Larger crews and transport failures were not verified live.
Built SDK packages were also consumed from a separate TypeScript project outside the monorepo. The core runs without Twitch credentials or network access.
What I learned and what comes next
Audience participation works best when the command, acceptance, decision, and game consequence are all understandable on screen.
Checkpoint is an experimental, MIT-licensed SDK with setup instructions, public package exports, TypeScript declarations, and contributor documentation. Developers can connect their own game actions; it is not an automatic mod for arbitrary games. State is currently memory-only, so durable recovery remains future work.
Built With
- eventsub
- express.js
- html5
- node.js
- openai-codex
- playwright
- react
- twitch
- typescript
- vite
- vitest
- websockets