In Spring 2000, I decided to write my own MUD from scratch, in C++, on one of my Linux boxes. Once the perceived hard problems were solved, I lost interest in the project and the source code just atrophied. I've dug it up, and think it may be of interest to folks who remember MUDs, or who want to write telnet servers for Linux or other servers. I'm releasing the source to everyone to play with. Have fun!
If you're not familiar with MUDs, I suggest you check out the Wikipedia Entry on Multi-User Dungeons (or Domains
if you weren't in a D&D-style one).
Basically, a MUD was a telnet server, that hosted tens (or
hundreds for the popular ones) of users at a time. Each user would
telnet in, often to an IP address of some server running in a
computer science department at a college, and use the command line
to move their character through a virtual dungeon. The experience
would look something like this:
Temple Square
You are standing on the temple square. Huge marble steps lead up to the
temple gate. The entrance to the Clerics Guild is to the west, and the old
Grunting Boar Inn, is to the east. Just south of here you see the market
square, the center of Midgaard.
Beastly Fido is here.
Beastly Fido is here.
> inventory
You are carrying:
Nothing
Beastly fido hits you HARD. Ouch!
> north
The Main Street
Pychlist is standing here, wielding a sword
Beastly Fido enters the room, snarling
Psychlist DESTROYS Beastly Fido with his sword.
Beastly Fido is dead.
> look
The Main Street
You are on the main street crossing through town. To the south you see
the entrance to the temple Square.
Psychlist is standing here, wielding a sword
The corpse of Beastly Fido is here.
>
You get the picture. It was actually fun to even type up the
description for this post. :)
If you were on a really popular MUD, you'd get "spammed" with
update messages from all the other people in the same room,
sometimes lag due to the slow connections and CPU loads from back
then, and then find out you were dead once your line freed back up.
Still, it was fun.
Advanced users on MUDs could create their own rooms, items,
traps, monsters and more. The MUD universes grew organically from
within the games themselves. It was addictive.
I've included a gzipped tarball of the source code in the links
below. It has been 10 years since I tried to do anything
with the source, so no guarantees that it will even compile.
However, it's interesting to look at and learn from.
Be sure to check out the related blog post for some interesting
historical context.