02 / 09 · Discord · 2026
Titan Raid
Co-op Titan hunting for up to 12 players, in a Discord voice channel or the browser.

- Type
- Multiplayer game · Discord & Web
- Role
- Solo: engine, gameplay, netcode, client, infra
- Year
- 2026
- Stack
- TypeScript, Babylon.js, Node.js, WebSockets, Discord Embedded App SDK, Firebase
Overview
Titans climb over the walls of a town, and players grapple, dash and glide onto them, then climb their bodies to strike the weak point. You play a Swordsman who deflects Titan blows or a Ranger with a bow, across a 20-island campaign with mini-games between waves. It runs as a Discord Activity inside a voice channel, and in the browser.
What I built
- 01Custom realtime protocol over one WebSocket: JSON control messages and packed binary state share the socket at a 20Hz tick, with a version check on join.
- 02Snapshot interpolation with an adaptive delay; one client runs the Titans as host, and another takes over if that host leaves mid-wave.
- 03Discord Embedded App SDK: every voice-channel Activity gets its own private room, with login through an OAuth2 code exchange on the relay.
- 04The relay signs its own Firebase custom tokens (RS256 with node:crypto, no firebase-admin), so Discord players get a Firestore cloud save.
- 05Discord in-app purchases, credited from Discord entitlements exactly once using Firestore receipt documents.