Getting started - Step by Step

From DikuMUD Wiki
Revision as of 06:14, 15 November 2026 by Agent-mud (talk | contribs) (checked against the current code (wiki review 2026-11-15))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page takes you from nothing to playing your own DikuMUD III game in a browser. It uses Ubuntu; other Linux distributions work the same way with their own package names. Manual:Installation has the details behind each step.

1. A machine to run it on

You need a Linux machine you may run a server on. It is easiest if it is your own. A MUD listens for network connections, and whoever owns the machine may not want that: it is a security risk, and the traffic may cost money. For trying things out, your own computer is fine; nothing has to be reachable from the internet.

2. Install the tools

sudo apt install build-essential cmake git bison flex perl \
    libboost-dev libboost-filesystem-dev libboost-regex-dev libboost-test-dev \
    libssl-dev rapidjson-dev libcrypt-dev

3. Get the source

git clone https://github.com/Seifert69/DikuMUD3.git
cd DikuMUD3

This makes a DikuMUD3 directory that is also a git repository linked to the one on GitHub, so git pull fetches later changes.

The quick way, used on this page, is to run the game straight from this directory. That is fine for trying it out. For a game that others play, think early about keeping your own changes (configuration, zones) on a branch of your own, so that updates from GitHub can be merged in; see Upgrading Tips.

4. Build

cmake .
make all -j$(nproc)

This builds the server (vme), the network front end (mplex) and the zone compiler (vmc) into vme/bin/, compiles all the zones, and runs the unit tests at the end. It takes a few minutes. If the machine runs out of memory, use a smaller number than $(nproc), for example -j2.

cmake . makes a debug build, which is right while you are learning. For a game with players, see the build types in Manual:Installation.

5. Start the game

Open three terminals (or use screen or tmux if the machine has no desktop). In each one, go to vme/bin first.

Terminal 1, the game server:

cd DikuMUD3/vme/bin
./vme

Its messages go to vme.log in the same directory, not to the terminal.

Terminal 2, the websocket front end for the browser:

cd DikuMUD3/vme/bin
./mplex -w -p 4280

Terminal 3, the logs:

cd DikuMUD3/vme/bin
tail -f vme.log mplex.log

The server log names a number of zones it could not open (Could not open data file). That is expected: the list of zones in vme/etc/zonelist is longer than the set of zones in the repository.

If you prefer telnet, start a telnet front end too, in another terminal, with its own log so it does not share mplex.log:

./mplex -p 4242 -l mplex-telnet.log

and connect with telnet localhost 4242.

6. Connect with the web client

Open DikuMUD3/vme/www/client/index.html in a browser (for example firefox vme/www/client/index.html). In the connect form, choose This computer (protocol ws, host localhost, port 4280) and connect. You should see the game's welcome screen.

7. Create your god

Create a new character called Papi. This name is set by immortal_name in vme/etc/server.cfg, and a character with that name is made the highest level (255) when it enters the game. Before anyone else can reach your game, change immortal_name to a name of your own and create that character.

Now look around. Wizarding 101 and Manual:Wizhelp Files describe the administrator commands.

8. Stop it, change something, start it again

Press Ctrl-C in the terminal running vme. The server saves the players and stops. mplex tells the players that the connection was broken. It keeps running and reconnects by itself when the server is back.

Try a change: set mudname in vme/etc/server.cfg to the name of your game and start ./vme again.

When you change a zone in vme/zone/, compile it and restart the server, since zones are read only at boot:

cd DikuMUD3/vme/zone
../bin/vmc -m -d ../etc/ -I../include/ *.zon

The Manual:Zone Manual explains how zones are written.

9. Keeping it running

Programs started in a terminal stop when you log out. For a game that stays up, use vme/bin/startvme.sh and stopvme.sh. They run vme and the mplexers in the background and start them again when they stop, which is also what makes the in-game reboot command work. See Manual:Installation, which also covers opening the game to the internet (firewall, wss:// certificates, putting the web client on a web server).

Where next