Someone stole a dead man's portrait โ and in a village where being remembered is what keeps you real, he's starting to disappear.
El Pueblo de los Muertos is a top-down, Game Boy-style village of the dead built for Dรญa de los Muertos โ and every spirit in it is a live AI agent running on an open-weight model, entirely on-device. They gossip, they lie, they trade evidence mouth-to-mouth, and โ with no scripts and no player โ they solve the case themselves.
What I Built
Nine spirits wander a pixel-art pueblo: they visit shops, gather by the fountain, inspect the great ofrenda, and slowly piece together who stole Solorio's portrait โ the last object anchoring him to memory.
- Every spirit runs on a small open-weight LLM (gemma3 via Ollama on desktop, on-device Gemma on Android). Each one decides where to walk, who to talk to, what to say, and which secrets to share.
- The proofs are scattered โ a dropped guitar pick, wax on a sleeve, humming heard at dusk. Nobody holds all of them, so the agents have to gossip the case closed: trading secrets, overhearing private mutters, repeating lies.
- At three proofs the village acts โ an accuser marches on the culprit, and the accusation, confession, motive and the town's reaction all play out as a live scene in the world.
- Meanwhile the victim is fading. Spirits whose remembrance battery dies dim into translucent skeletons until someone speaks their name. Solorio is the victim and a witness โ his testimony fades with him.
The player is an unseen living presence. You can simply watch โ the spirits genuinely solve it alone โ or tap any spirit and interrogate it: they answer from the secrets they actually hold, in their own persona voice. You can carry whispers between them, send one off to question another on your behalf, or speak a fading name to bring a ghost back.
Demo
๐น Watch the trailer โ 56 seconds, plays inline on GitHub.
Story screenshots and alternate cuts live in screenshots/.
How it works โ the model proposes, the engine disposes
The interesting engineering problem: LLMs are brilliant at sounding alive and terrible at being trustworthy. So the game is split in two.
- The open-weight model writes the voices. Every mutter, reply, lie and confession comes from the model, shaped by a persona card (vocation, traits, grudges) and the secrets that spirit genuinely holds.
- A deterministic Dart engine owns the truth. The knowledge graph โ who knows which secret and how they learned it โ plus the secret ledger, the three-proof verdict threshold, walk schedules, memory batteries and fades are all plain, testable Dart. The model can propose anything; it cannot mint truth.
That split is what makes "no scripts" honest: the deduction is emergent, but the case can't be hallucinated. A whisper only counts toward the verdict if it was actually carried โ by a spirit, or by you.
It also makes the game testable. A ext.pueblo.cmd driver socket exposes state, shot, speed, chat, look and solve โ the last a "director's cut" that seeds the ledger so the confession scene can be filmed on demand. 92 tests cover the sim engine, the sprite contract and the mystery logic, and --dart-define=LLM=mock runs the entire village with canned lines on machines with no GPU.
Stack: Flutter ยท Flame ยท Dart ยท SQLite ยท Ollama + gemma3 (open weights) ยท flutter_gemma. MIT licensed.
Why open innovation matters here
This game is the theme. The ghosts are literally in the machine โ and the machine is yours.
- No API keys, no cloud, no internet. Every spirit thinks on the player's own hardware. The village keeps gossiping with the Wi-Fi off โ on a plane, in a basement, forever.
-
The minds are inspectable and swappable. Because the model is an open weight served over a standard local API, you can pull any Ollama chat model and watch the same village develop different personalities โ swap
LLM=and the whole pueblo changes character. - Nothing private leaves the device. Every whisper, secret and confession stays on disk. For a game about memory โ about what we choose to remember of the dead โ shipping the villagers' souls to a data centre felt wrong.
- It can't be sunset. The spirits don't live on someone's endpoint. As long as one person has a copy, the village keeps its dead.
Interpreting "Ghost in the Machine"
I took the theme literally, twice over. First: literal ghosts โ spirits of the dead โ running inside a literal machine, via local inference on commodity hardware. Second: the theme's deeper echo โ a village that honours the past. The core mechanic is remembrance: spirits stay real while someone remembers their name, and the climax is a town carrying a dead man's story until it can be proven true. It's Dรญa de los Muertos as a game system.
Prize categories
-
Best Use of Gemma โ the villagers' minds are
gemma3served by Ollama on desktop, with an on-device Gemma path (flutter_gemma) for Android. Every line they speak is open weights, running locally. - (Overall prize โ automatic entry.)
Running it
git clone https://github.com/Musaddiq625/pueblo
cd pueblo
ollama pull gemma3:4b && ollama serve
./run_macos.sh # macOS, real model
# or no model at all:
./run_macos.sh --mock # canned lines, still plays the full case
For judges without a Mac or GPU: the mock path plays the whole mystery end-to-end, and the driver socket can fast-forward (speed) or jump straight to the confession (solve). Repo: https://github.com/Musaddiq625/pueblo ยท MIT.
Built with โค๏ธ by Musaddiq625

Top comments (0)