MegaMOO

An AI-enabled engine for building multiplayer text worlds.

Python 3 · one process no dependencies SQLite persistence telnet + websocket

Download MegaMOO Source on GitHub Engine and starter world · Python 3.10+ · zero dependencies

Questions and help: GitHub Discussions — ask anything, including the basics. Answers stay public and searchable.
Chat: the MegaMOO Discord — for hellos, works in progress, and thinking out loud.

What MegaMOO is

MegaMOO is a text-based virtual world engine — the LambdaMOO model rebuilt from scratch in Python 3. It hosts a shared, programmable world that players connect to over telnet or websocket, where they move between rooms, handle objects, and talk to each other. Builders and programmers extend that world while it is running, by writing code directly into the live database.

It combines the object-oriented model LambdaMOO proved in 1990 with modern Python: asyncio networking, SQLite persistence, and the full standard library available inside the world's own code.

MOO's model, not MOO's language

MegaMOO keeps what makes a MOO a MOO — objects carrying their own properties and verbs, single-parent inheritance, programming the world from inside it while it runs — but verbs are written in Python rather than the MOO language. Existing MOO code does not run unmodified and has to be ported. Because the object model carries over unchanged, that work is mostly mechanical substitution inside the verb bodies.

A browser client is included. Start a world with --web and players can play it in a browser with no client to install — a terminal with colour and clickable exits, a map that draws itself as they explore, and their own triggers and aliases in Lua or JavaScript. Telnet players and browser players share the same world. See The Web Client.

A small footprint

MegaMOO is one Python process and one database file. Installing it is pip install megamoo, and that is the whole of it: the engine has zero third-party dependencies, so there is nothing further to satisfy — no web server to configure, no database server to administer, no build step, nothing to compile. (The one vendored library anywhere in the project is the Lua interpreter the browser client's optional scripting host uses; it ships as a static file.)

That matters more than it sounds. It means a world costs nothing to keep running and can live on a laptop or the cheapest VPS you can rent. The running world is a single file you can copy; the source you write — verbs/ and game/ — is an ordinary directory that belongs in git. And you can run five worlds at once on one machine without them interfering with each other.

Built to be worked on with an AI assistant

MegaMOO exposes its live world through a local API, so an AI assistant can work inside the running game rather than guessing at it from source files. Connected that way, an assistant can read what an object really holds, write a new command, run it as a test character, read exactly what the game printed back, and check the log when something breaks — then fix it, with the world still running and players still connected.

The engine's design happens to suit this unusually well. Every command is a short, self-contained Python file with a fixed set of variables available and no imports to resolve, so a single command is a small, bounded problem — the kind an assistant handles reliably. World-building stops being a slow edit–restart–reconnect loop and becomes a conversation.

What you get out of the box

Verb code is pure PythonNo purpose-built MOO language to learn.
SQLite persistenceYour whole world is one portable file.
Hot reloadChange a command; the next player to type it runs the new version. No restart.
ANSI colour16, 256, and hex RGB.
MUD protocolsGMCP, MSDP, MSSP, MXP.
Browser clientTerminal, automap and player scripting, served by the game itself.
Effects and tickersTimed buffs, debuffs, and scheduled behaviour.
AccessibilityPer-player screenreader mode that strips colour and decoration.

Where to go next

First

The MOO Paradigm

Why a world that contains its own code is the right shape for building virtual places.

Then

Getting Started

Creating a world of your own, starting it, playing in a browser or over telnet, and running several at once.

Build

Naming & Creating Objects

How a name is assembled, how players refer to things, and the commands that make them.

Build

Rooms & Exits

Digging rooms, connecting them, and the messages players see as they move.

Build

Verbs

Where commands live, staff authority, and giving one object behaviour of its own.

Build

The Help System

How players find out how your world works — and why commands document themselves.

Organise

Object Numbers & Zones

Reserving a block of numbers so a zone stays together.

Bring to life

A World That Moves

Tickers and effects — things that happen without a player typing anything.

Bring to life

Food, Drink & Shops

Edibles, drinkables and the merchant system.

Reference

Command Reference

Every staff command, grouped by what it is for, with the level each one needs.

Reference

Coming from LambdaMOO

Importing an old database, the staff commands you already know, and porting MOO verb code to Python.

Reference

The Web Client

Playing in a browser, the out-of-band data stream, player scripting, and extending the client yourself.

Looking something up

The chapters teach by example; the Command Reference lists every staff command in one place. For the engine itself — the object model, the parser, verb types and the systems underneath — see the developer manual in docs/manual/.