Inspiration
DungeonFlux started with a question: could an AI run a tabletop adventure for a group of friends while keeping the rules fair and the world consistent? We wanted the shared experience of a game night, with a TV as the table and phones as character sheets, without asking one player to manage every rule and play every character.
What it does
DungeonFlux is an AI dungeon master for in-person fantasy role-playing. Players join through a QR code, create heroes on their phones, and share a narrated adventure on the main screen. The prototype brings together character creation, NPC conversations, persuasion checks, story hooks, and a short tactical fight.
The core design separates storytelling from authority. AI generates narration and character dialogue; a deterministic engine owns legal moves, dice rolls, hit points, and outcomes. NPC information is restricted to what that character should know. A failed roll changes the route through the story rather than stopping the adventure.
How we built it
The server and browser interfaces are written primarily in Go. GoWebComponents compiles the TV, phone, and host interfaces to WebAssembly. GoGRPCBridge carries state and media over gRPC through WebSockets, while SQLite stores events and assets. PlayCanvas renders the 3D Gaussian-splat battlefield.
Provider adapters connect OpenAI, Google Gemini, and Anthropic for language generation; ElevenLabs for speech recognition, character voices, sound, and music; and image/video providers for visual assets. World Labs supplies generated 3D environments. Cached media and fallback paths help keep the experience moving when generation is slow.
Development used AI coding agents with explicit tasks, review, automated checks, and browser rehearsals. Existing libraries, including GoWebComponents, GoGRPCBridge, and SchemaFlux, provided foundations for the hackathon application.
Challenges we ran into
The hardest problems appeared where systems met: reconnecting phones receiving stale state, callbacks arriving after a reset, voice and caption synchronization, and generated media loading too late. We addressed these with authoritative server snapshots, event-driven state machines, cancellation and attempt tracking, and integration tests. NPC dialogue also needed validation before it reached subtitles or speech.
Accomplishments that we're proud of
The development log records a two-player playthrough reaching the ending without a reload or host skip, along with working phone readiness, character sheets, and English/Spanish interface support. We are proud of making rules and outcomes inspectable while leaving room for expressive AI storytelling. The prototype still has media and battlefield animation polish in progress.
What we learned
Passing component tests does not prove that a multiplayer experience works. Real browser rehearsals revealed integration failures that isolated tests missed. We also learned that reliable generative experiences need explicit state ownership, bounded latency, and useful fallbacks as much as good prompts.
What's next for DungeonFlux
Expand the single-scene prototype into longer campaigns, add richer combat with spells and conditions, preserve NPC memory across sessions, and finish live dialogue and cinematic reliability testing.
Credits
Rules material includes the System Reference Document 5.2.1 by Wizards of the Coast LLC, available at https://www.dndbeyond.com/srd and licensed under CC BY 4.0: https://creativecommons.org/licenses/by/4.0/legalcode. The project site's gallery is labeled concept art.
Built With
- anthropic
- elevenlabs
- gemini
- go
- gogrpcbridge
- gowebcomponents
- grpc
- openai
- playcanvas
- schemaflux
- sqlite
- webassembly
- websocket
- world-labs
Log in or sign up for Devpost to join the conversation.