Inspiration

Millions of students across the United States share that collective childhood memory: crowding around a bulky school computer, agonizing over whether to ford the river, and inevitably dying of dysentery. The Oregon Trail wasn't just a game; it was our first interactive lesson in history and resource management.

For Track 1: Past (Childhood Games), we wanted to capture that exact magic but remove the boundaries of only one event in history. We asked ourselves: What if you could play The Oregon Trail for any era, any community, and any crisis in human history, just like a Kahoot! or Mafia game? That question led us to build Chronicles, an AI-powered survival story engine that can teach the struggles and lives of people of the past, reenact scientific discoveries and landmark historical events, train decision-making and teamwork skills, and hypothesize outcomes of modern events. We wanted to build a "multiplayer time machine" where the narrative emerges dynamically from the interactions between human players and an AI game master, turning historical events into a high-stakes, cooperative, and educational party game.

What it does

Chronicles is The Oregon Trail reimagined for the generative AI era.

  • The Time Machine: You type any scenario in plain English (e.g., "A 1930s Dust Bowl farming community" or "A Roman legion lost in the Alps").
  • World Generation: In seconds, our backend spins up a unique cast of AI agents (each with specific roles, relationships, and stats), starting resources, and dynamic metrics.
  • Multiplayer Co-Op: Friends can join your lobby from their phones by scanning a QR code.
  • The Simulation Loop: Every turn, the AI agents interact, argue, and make decisions based on the overarching historical crisis. The game generates visual-novel style cutscenes, tracks ticking resources, and presents your party with brutal, branching decisions.
  • The Objective: Your overarching goal is to survive the unforgiving 30-day story. However, mere survival isn't enough each character has a unique, hidden objective determined by their specific role and personality. You must balance the survival of the community with branching choices that secretly advance your own agenda.

You aren't just reading a generated story; you are actively managing a living, breathing, data-driven simulation of history.

How we built it

We split the problem into three layers: a real-time game server, a cinematic web client, and an AI game master that can author both prose and structured game state on demand. Google Gemini powered the whole thing - LLM calls, image generation, voice generation, and video generation.

Architecture Chronicles is a client-server game built around long-lived WebSockets. The Python backend FastAPI owns room lifecycle, turn order, and authoritative simulation state. The Next.js frontend React renders the host experience and a separate, mobile-friendly player client for co-op sessions joined via QR code. Both sides share a small set of typed message contracts so every event—world generation, lobby updates, cutscenes, and per-player actions—stays in sync without fragile polling.

Frontend After building mockups in Figma, we leaned into Tailwind CSS for rapid UI iteration and Framer Motion for cutscene-style transitions (dialogue beats, stat pulses, and lobby polish). The landing and join flows use a fixed design canvas scale so the experience stays legible on phones while still matching our desktop layout intent. Environment-aware URL helpers resolve the correct backend and WebSocket bases so QR links and dev servers behave predictably. Google Gemini Imagen produced stunning background images from the API in seconds.

Backend & Game Loop A dedicated game engine module orchestrates each run: it requests structured outputs from Google Gemini 3 (party roster, relationships, objectives, and turn-by-turn narrative), merges them into the live room state, and pushes updates to every connected client. Scene visuals use Imagen-style image generation through the same Google GenAI stack, while character and narrator audio use Gemini TTS when available (with graceful degradation if quotas or keys block a provider). The server remains the single source of truth for resources, permadeath, and win/loss conditions so clients can't "cheat" the simulation.

Multiplayer Co-op is first-class: the host creates a room, we expose a shareable join URL, and additional players connect over WebSockets with role-aware routing. The phone or PC client reuses the same narrative payloads as the host but optimizes layout for thumb reach and short sessions.

How the pieces click each turn In plain terms: the client captures intent (choices, dialogue selections, role claims); the server validates it against the current phase; the model proposes the next story beat and the stat deltas; the server commits both; everyone receives the same rendered "episode" of the chronicle. That loop is what lets Chronicles feel like The Oregon Trail—except the trail is whatever history you typed into the box five minutes ago.

Challenges we ran into

Keeping Chronicles from feeling like “pretty chat logs with buttons” was harder than wiring the stack. Three problems kept us up at night: interaction, agency, and prompting the GM.

Making gameplay feel interactive and fun A strong language model can sound exciting while the player mostly watches. We had to design a tight turn loop—clear phases, visible stakes (resources ticking down, relationships shifting), and cutscene beats (art + audio + dialogue)—so every round felt like a game state advanced, not just another paragraph. Balancing latency, cost, and "always something to do" for both host and phone players was an ongoing fight.

Giving meaning to player choice and agency If every option converges to the same outcome, players disengage. We pushed for choices that change the simulation: stats, resources, trust, who gets hurt, and what encounters unlock later. The hard part is doing that without the model quietly retconning the world or flattening consequences when it tries to be “nice.”

Prompting Gemini as a game master for cohesion and surprise We needed a GM that could improvise and respect canon: consistent character voices, a through-line for the scenario, and escalating tension across many turns. Early prompts either over-explained (boring, samey beats) or under-constrained (wacky tone shifts, contradictory facts). Iterating on structured outputs, explicit constraints (what must not change vs. what may vary), and memory hooks from prior turns—without blowing context—was the core craft challenge behind "interesting and cohesive."

In short: the infrastructure was the easy part; the product challenge was teaching an AI to run a table where every click should feel like it mattered—and where the story still held together when four humans all tried to steer it at once.

Accomplishments that we're proud of

Game Loop We went from a nostalgic premise to a working pipeline: type a scenario, get a generated party with stats and relationships, then play through turns with resources, encounters, and permadeath-style stakes—not just a one-off story dump.

Multiplayer friends can join from their phones with a QR code lobby flow, claim roles, and stay synced with the host over WebSockets—so Chronicles reads like a party game, not a single-player prototype with multiplayer taped on the side.

Cinematic presentation on a hackathon timeline We invested in a polished host UI—visual-novel style cutscenes, motion, and readable, and intuitive client UIs for each player.

What we learned

Players trust systems more than prose Clever writing gets you halfway; predictable rules (phases, meters, win/loss signals) are what make people believe their actions matter. When the UI mirrors the simulation—stats move, relationships shift, the spotlight changes—the story reads as true even when it’s generated.

Agency is a design problem, not a model parameter A bigger model doesn’t automatically produce meaningful branching. We learned to treat choices like APIs: each option should commit to state deltas the server can enforce, instead of letting the model "narrate away" consequences to keep everyone comfortable.

The GM prompt is a product surface Small prompt edits change tone, pacing, and continuity more than any single UI tweak. We learned to iterate like designers: tighten constraints, add structured outputs, and keep a short list of non-negotiables (who the party is, what the crisis is, what must not contradict) so improvisation stays fun without turning incoherent.

Multiplayer raises the bar on clarity One confused player stalls the table. We learned to optimize for "join in 30 seconds" flows—obvious next actions, readable room codes, and host/player parity—because social games die in the lobby, not in the lore.

Shipping beats perfect lore We learned to bias toward playable slices: a tight loop with occasional rough edges beats a sprawling story nobody finishes. Hackathon time rewards systems you can demo repeatedly—and that’s exactly what Chronicles needed to feel real.

Takeaway: the lesson wasn’t "AI can write"—it was how to wrap AI in game design so people feel clever, pressured, and together at the table.

What's next for Chronicles

Enhanced Visual Storytelling We plan to dynamic scene art with animation passes (parallax, environmental motion, character micro-expressions and lip sync), richer map/journey presentation, and stronger visual continuity between "travel", "rest", and "crisis" beats.

Improved Gameplay Impact Give spectators and fallen characters something to do—lightweight votes, omens, "last words," resource donations, or map pings—so the table stays social even after death. Layer in optional interactive minigames for risky actions (river crossing, surgery, repairs) so high-stakes moments feel skill-based, not only narrative roulette.

Save, Share, and Compare Chronicles Let players export a finished run as a shareable artifact—timeline, stats, key choices, best quotes, and scene highlights—so groups can brag, debrief, discover, or retell other users' stories in a community feed or link-first sharing flow.

Built With

Share this project:

Updates