💡 Inspiration We were inspired by high-stakes boardroom dynamics and classic social deduction party games like Mafia, Werewolf, and Among Us. We wanted to bring that same tension and psychological intrigue directly to Reddit’s feed, allowing communities to play a polished, strategic deduction game featuring tech leaders (like Sam Altman, Elon Musk, and Mark Zuckerberg) trying to root out the boardroom impostor.

🎮 What It Does The Round Table is a high-fidelity social deduction game built directly for Reddit using Devvit Web and Phaser. It features two game modes:

Classic Mode: Standard Mafia mechanics where players must discuss, accuse, and vote out suspects. Power Mode: Action-packed Mafia rules featuring CEO Signature Abilities (e.g., Jensen's ⚡ Overclock, Tim's 🛡️ Privacy Shield), ghost chat reactions, and random boardroom events. The Trial & Voting Mechanics Blind Voting: In initial voting, choices are kept secret to prevent bandwagoning. Defense Speech Trial: The top two accused players are put on trial and given 20 seconds to plead their innocence in the chat feed (bots argue automatically; human players type their own defense). Hands-Up Vote: Players raise their hands publicly to decide who is eliminated. Gemini Omni AI Video Simulator: A full-screen cinematic overlay that shows a video of the execution (e.g. falling through a trapdoor, rocket boosters) accompanied by funny, custom typewriter-narrated stories. Subreddit Leaderboard: Player score ranks are persisted in a Redis Sorted Set, allowing users to compete for the highest score on the subreddit. 🛠️ How We Built It The application is structured into two main components:

Devvit Backend (TypeScript/main.tsx): Manages Reddit user authentication, processes incoming message events from the frontend, and handles stats/rankings using Reddit's Redis cache (context.redis). Phaser 3 Web Client (TypeScript/Vite): Handles the custom 3D isometric table, circular character seat arrangements, bobbing/breathing tweens, visual speech bubble cues, and floating emoji feedback. Web Audio API Synth: Rather than loading bulky audio files, we built a procedural audio synthesizer that generates heartbeats, clock ticks, gavels, and fanfares using oscillators. 🚧 Challenges We Faced State Machine Synchronization: Coordinating phases between the Phaser canvas, the chat feed updates, and full-screen video overlays without blocking the main game thread was tricky. We solved this by using a state transition sequencer in our core engine. CDP Connection & Audio Constraints: Browsers prevent autoplaying audio before the user interacts with the page. We resolved this by building a lazy Web Audio context resume bound to the user's first mode-selection click. Devvit Asset Loading: Inlining assets and styling to avoid path errors inside Devvit’s iframe sandbox. 📈 What We Learned How to coordinate complex messaging pipelines between a Phaser webview and a serverless Devvit backend. Managing player rank lists efficiently via Redis Sorted Sets (zRevRange / zIncrBy). Synthesizing clean, atmospheric game SFX dynamically in code. 🔮 What's Next for The Round Table Real Multiplayer Lobby: Expanding the game from bots to real-time multiplayer support with other redditors in the comment section. Real AI Avatar Integration: Linking to Google Gemini's likeness API so players can record their real face/voice and see their custom clone play at the table! More CEOs & Powers: Adding more characters with signature abilities (like tech founders or developers).

Built With

Share this project:

Updates