Dan Munro - Dev-Sec-Ops Engineer   About

Nodesrv: A MUD Framework In 2018

In this article I want to share my free-time project, a MUD, or multi-user dungeon. This particular project is not quite a game per-se, but a framework for building a game. It’s called nodesrv. Prefaced with a short story about the history of MUDs to provide some context, I’ll lay out my reasoning for such a peculiar project and why I think it has value today.

A Narrated History

Back in the early days of the consumer internet, when social interactions happened in text over TCP, a new form of leisure entertainment was starting to take shape. There weren’t many defining characteristics for this emerging genre of games, however they did share some traits.

Fantasy in the form of medieval, LOTR, and scifi themes were common. Dungeon crawling, usually via cardinal directions, was also a defining trait. Complex application state, network connections that measured in the hundreds, authentication over unencrypted protocols, bespoke persistence schemes, and a culture that did not include automated tests. Truly, it was a wild west.

Blended with social aspects of BBS, these games were an audacious mix of technology and imagination. Often developed and run by volunteers, each game represented an experiment in anarchy, value was derived through individual interactions and connections between people. Friendships blossomed where individuals would have otherwise never known one another.


The project consists of two repositories, the main server component, and its client. Both projects utilize Typescript, and are licensed under MIT now and forever.

The Client

The app runtime is Electron, which means a few things. It is cross-platform and built with JavaScript, HTML, and CSS. Connections to the server utilize web sockets.

While the client app is text-based and currently incredibly bare-bones, there is potential.

The Server

The server runtime is ts-node, a Typescript execution environment for node.js. Persistence is managed via TypeORM. Tests are provided using Jest.


The universe is represented in a graph, with rooms as the edges, connected by directed exits. Mobiles, or mobs, populate the world. The world currently consists of only a few dozen rooms, randomly generated into a single scene.

The current strategy is to procedurally generate the world, by defining characteristics of smaller regions and then joining these smaller regions together randomly.

The Typescript node runtime makes for an excellent asynchronous execution environment when managing long-running, complex application state and bi-directional client communication.

The Future

Another budding interest of mine, machine learning, offers some very interesting opportunities for unique and engaging stories within a game universe. While the tooling is still young, there are a few promising libraries published already that can make getting started easier:


On its face, creating a MUD today seems like a bizarre hobby. But it’s less about what the project is and more about what the project represents; learning, playing with technology, testing assumptions, refactoring, and flexing the imagination, to name a few.

It’s a huge work in progress, and a lot of things have been done wrong along the way. But each mistake has been a potential learning opportunity. And a lot of those opportunities have been actualized into knowledge gained.

The first generation of MUDs were born from a wealth of ingenuity, curiousity, and playful imaginations. And while MUDs may well never experience the popularity they once had, that’s okay. To pay homage in some small way to such a radical and whimsy vision is enough.

Written on August 24, 2018