nohkumado
Bruno Boettcher is a dilettante with a habit of searching the fun in otherwise serious stuff. When not writing Rust or Flutter Apps, he can be found convincing people that decentralized systems are more fun than they sound, and that nothing beats open source.
Session
What if I told you that Matrix — the protocol you use to send memes and coordinate sprints — is secretly one of the best foundations for building interactive, stateful games?
This talk walks through the construction of a Matrix Treasure Hunt Bot: a Rust-based game engine where players solve riddles in DMs to unlock invites to new rooms, progressing through a story that lives entirely inside a federated chat network.
But this isn't just a fun project showcase. Under the hood, it's a solid example in the real challenges of building reliable bots on a federated protocol:
The Join Problem: Why room joins fail 30% of the time across homeservers — and how exponential backoff with jitter makes your bot resilient without hammering the federation.
The Ghost Problem: How bots silently accumulate thousands of orphaned rooms, and the automated housekeeping patterns that prevent it.
Stateful Sessions on a Stateless Stream: Mapping Matrix's event firehose to persistent player sessions, with versioned JSON state that survives reboots and code deploys.
A Trait-Based Shell: Building an extensible command system inside a chat bot — so adding !hint or !stats is just implementing a single Rust trait.
Whether you've never touched matrix-sdk or you're knee-deep in your own bot project, you'll leave with concrete, production-tested patterns for building bots that are as resilient as they are fun.
The code is open-source (GPL3) and the bot is live. You can play it today.