Anyworld: A Self-Hosted Multiplayer Text RPG Powered by Local LLMs
A developer introduced Anyworld, an open-source, browser-based multiplayer text adventure game where a local LLM serves as the Dungeon Master to narrate stories and resolve player actions. The game delegates actual RNG dice rolls to Python while leveraging llama.cpp or cloud APIs for narrative generation and structured memory management. Anyworld enables private, self-hosted AI tabletop sessions without requiring participating players to install models or set up complex hardware. It demonstrates a practical hybrid architecture—combining deterministic Python logic for game rules with LLM narrative skills—to reduce AI hallucinations in interactive story games. The game features multi-player round resolution, secret DM guidance tools, hidden percentage triggers, and automated memory compression audited by a secondary LLM pass. Current limitations include hosting only one active session per server, lack of loadable save files, and temporary reliance on self-signed HTTPS certificates.
## BACKGROUND
Large language models (LLMs) are widely used to generate dynamic narratives in text-based role-playing games, a genre pioneered by platforms like AI Dungeon. Executing these models locally on consumer hardware often relies on tools like llama.cpp, an open-source library that enables efficient LLM inference without relying on external servers.