What is this? A reasonable question but it may take some explaining. First, DimSum is a MOO. A MOO stands for “MUD, Object Orienated” which isn’t very helpful because now you’re probably wondering what a MUD is. MUD stands for Multi-user Dungeon and now that we’ve established a clear pattern and I’ve acknowledged history we can get into the details.
DimSum is basically a game engine for online, text-based social worlds. Not games in the rouge-like sense, necessarily though the concept could easily be expanded. Imagine second-life if computers stayed with text-based terminals. All interaction with the world happens via text based commands and at every turn as much flexibility was left to the administrators as possible.
In the end, it’s probably better to look at a few examples and then just dive in.
Everything is written in Python. In fact this has been my first large-scale modern Python project in a long time and it’s been an absolute pleasure to use. What this means, though is that even the code that users contribute to the worlds they participate in is Python. This is different from other MOOs where a language is embedded and needs to be learned. It also comes with some trade offs, as we’ll see.
Another caveat is that much of the documentation is actually in the example world itself and is intended to be consumed as part of interacting with that world. If that’s not for you, feel free to poke around.
Every world is made up of unique objects or, as they’re known in the code, entities. Entity is a common name for any object, thing, player, NPC or even walls and doors that are in a game’s world and require simulation and participate in the game’s rules. It sounds intimidating but the word object is usually taken so us programmers make up other ones because we can’t always use the word `object` where we’d like.
In DimSum an entity can refer to others, forming a complicated object graph that is serialized/deserialized to JSON blobs, one per entity. This is a fairly complicated process and as much as possible is hidden from users and developers by the framework. In the end, DimSum is mostly about JSON, as we’ll see later.
All entities have a set of core attributes and behavior they come with and additional behavior can be attached to them via the use of a custom `Scope`. A Scope is basically a Python class that encapsulates the behavior and the data for some concept or idea. Examples of scopes: