Teza's tech notes

Building Talewalkers: a multiplayer story game with an AI narrator

11 February 2026 · 1 min read
#python#websockets#ai#gamedev

Talewalkers is a game I've been building where up to five people play a story together, each on their own phone, and an AI narrates.

The pieces:

  • Server: Python, with WebSockets so every player sees the story update in real time.
  • The narrator: Google's Gemini models. The rules engine decides what actually happens (dice, hit points, success or failure); the AI only describes it. That split keeps the game fair and stops the AI from inventing rules.
  • Storage: SQLite for now. Small, simple and enough for this stage.
  • Packaging: one Docker image, built and tested on every change.

The hardest part wasn't the AI, it was the real-time side: what happens when a phone drops off Wi-Fi mid-scene, or two players act at the same moment. Most of my tests are about those edges, not the happy path.

You can try it at px9.net.