Inspiration

Murder mystery games have always put the player in the same role — the outsider who arrives after the fact, observes the scene, and solves the puzzle. We wanted to flip that. What if you were already there? What if you had something to hide?

The idea was to make a mystery where the player is embedded inside the story as a suspect, not above it as a detective. That shift in perspective changes everything — suddenly the conversations feel personal, the clues feel dangerous, and the stakes feel real. We wanted to build the kind of story you'd tell around a campfire: gripping, unpredictable, and alive.


What it does

Campfire Mysteries is an interactive storytelling game built on a multi-agent AI architecture. Players are embedded as suspects inside an original murder mystery, generated fresh each session by Gemini. Unlike detective games where the player observes from the outside, here they receive a private dossier — their character, their alibi, one secret — and must navigate conversations with independent NPC agents who only know what their character knows.

Core features:

  • AI Story Generation: Before the mystery begins, the player shapes the world. They choose the location, the core themes, and a plot twist to set the tone. From those choices, Gemini Pro generates everything — the player's own background and role in the story, the full cast of suspects, the details of the incident, and every clue planted inside it. The complete mystery is saved to the database and becomes the single source of truth that only the Narrator can access.
  • Multi-Agent NPC System: When a session starts, two types of agents are created. A Narrator agent powered by Gemini Pro receives the full story — every secret, every clue, every lie. Then for each suspect, a separate NPC agent powered by Gemini Flash is created, receiving only what that character would actually know about themselves. Nothing more. Each suspect is genuinely blind to what the others are hiding.
  • Interleaved Multimodal Output: The story is not just text. As the mystery is generated, a cinematic background image sets the scene and a unique portrait is created for every character in the story — suspects, the narrator and the player. Everything is generated together as part of a single cohesive creation process.
  • Voice Narration via Gemini TTS: Every character in the story has their own unique voice, and the Narrator has one too. Audio is generated in small parallel chunks so it starts playing almost immediately without breaking the flow of the scene. Every voice is consistent throughout the entire session — you always know who is speaking before they finish their first word.

How we built it

Layer Technology
AI Models gemini-2.5-pro-preview (story generation + GM narration), gemini-2.5-flash-lite-preview (NPC + planning agents), gemini-2.0-flash-image-preview (scene + portrait images), gemini-2.5-flash-preview-tts (voice narration)
Agent Framework Google ADK 1.18.0 (Agent, InMemoryRunner)
Backend Python 3.11, FastAPI, uvicorn
Database Google Cloud Firestore
Object Storage Google Cloud Storage (Firebase Storage)
Hosting Google Cloud Run (1 CPU, 1 GiB RAM, 1-hour timeout)
CI/CD Cloud Build → Artifact Registry → Cloud Run (auto-deploy on push)
Frontend HTML, CSS, JavaScript (static files served via FastAPI)

The architecture is built around a strict separation of knowledge. The Narrator agent is the engine of every scene — it receives the full story, decides the order of action, and controls the flow of every turn. But it has one strict rule: it never speaks for a character. When a suspect's moment arrives, the Narrator briefs that NPC agent with the current story context and asks what they do. The NPC responds from their own perspective and knowledge. The Narrator then weaves that response into atmospheric prose and sends it to the player.

To keep the story feeling alive, the moment the first character's response is sent to the player, the Narrator is already talking to the next NPC agent in the background — briefing them, collecting their response, preparing the narration. By the time the player finishes reading, the next beat is ready. The story never waits.

The opening scene is pre-generated and cached before the player even enters, so the experience starts the instant they arrive. Audio is handled the same way — every narration is broken into individual sentences and each sentence is generated as its own audio chunk in parallel, so the first word plays almost immediately while the rest are still being prepared.


Challenges we ran into

Audio was the hardest problem to solve. The Narrator speaks in long atmospheric passages. Waiting for the entire narration to generate before playing anything would break the immersion completely. The solution was to split every narration into individual sentences and generate each one as a separate audio chunk in parallel. The first sentence starts playing almost instantly while the rest are still being prepared. Getting the sequencing, buffering and playback timing to feel seamless — without gaps, overlaps or out-of-order chunks — took significant iteration.

Keeping agents in character under pressure. With multiple independent NPC agents each holding partial information, consistency was a constant challenge. An agent responding without the current context of the room could contradict what another character had just said. Getting the Narrator's briefing format precise enough that each NPC could respond coherently — without ever being given information their character wouldn't have — required careful prompt engineering and a lot of testing.

Making the opening not feel like a loading screen. The first moments of any experience are critical. Early versions had the player staring at a progress indicator while the story, images, and agents were all initialised. Pre-generating and caching the opening scene before the player even enters was the fix — but getting that pre-generation to happen reliably and quickly enough to be invisible took architectural work across the generation pipeline.


Accomplishments that we're proud of

The multi-agent illusion holds up. Each NPC agent genuinely only knows what their character would know. They do not coordinate. They do not share information. Yet when the Narrator weaves their independent responses together, the result reads like a coherent scene with real characters making real decisions. The seams are invisible — and that was the hardest thing to achieve.

The story never waits. Between background turn pre-generation, pre-cached opening scenes, and parallel audio chunking, there is almost no moment in the experience where the player is sitting idle. For a system this complex — multiple agents, image generation, TTS, Firestore — making it feel instant took deliberate engineering at every layer.

Ignorance became the best feature. Limiting what each NPC agent knows was originally a practical constraint. It became the defining quality of the experience. Characters who only know their own secrets are more consistent, more believable, and more surprising. It is the architectural decision we are most proud of — and the one that made the whole thing feel real.


What we learned

Less choice, better story. Early versions gave players sliders, toggles and configuration options. The more control we added, the weaker the stories became. When we stripped it back to just a location, a few themes and a twist, something clicked. The model stopped trying to satisfy external settings and started focusing on internal logic. The mysteries became sharper, more coherent and more surprising. Sometimes the best design decision is removing things.

The illusion of a seamless experience matters more than technical perfection. The most natural feeling approach is not always the most technically obvious one. Instead of generating the entire scene upfront and delivering it all at once, having the Narrator talk to one character at a time and return responses immediately felt far more alive. The player experiences the story unfolding in real time — because it genuinely is. The goal was never technical elegance. It was making the player forget they were talking to a machine.

More agents means more chaos. In the best possible way. Each character added to the story is another brain making independent decisions. They do not coordinate. They do not know what the others are saying. This creates a domino effect where one character's response shapes the next, which shapes the one after that, in ways nobody — including us — can fully predict. The more agents are in the room, the more unexpected the story becomes. It stopped feeling like generated content and started feeling like something actually happening.

Where you drop the player in changes everything. We tried starting the story with exposition — setting the scene, introducing characters, explaining the situation. It felt like a tutorial. The moment we dropped the player directly into the room after the body was already found, with private knowledge they could immediately recognize in the world around them, the experience transformed. The story felt urgent and personal from the first line. Beginning in the middle of something is always more powerful than explaining how it started.


What's next for Campfire Mysteries

Campfire Mysteries is becoming a daily challenge.

Every day, a new curated mystery drops for everyone. One story, one crime, one chance to solve it. Players explore clues, interrogate suspects and make decisions that others might not — because there is more than one path to the truth. Every choice matters and every session is a race against time.

The twist is the competition. Everyone is playing the same mystery, but how fast you solve it, which clues you find and how few wrong turns you take — that is what separates the best from the rest. A global leaderboard tracks it all. Every day is a new chance to prove you are the sharpest mind in the room.

One mystery. Thousands of players. One culprit.

Built With

Share this project:

Updates

Submission history