Getting started - Step by Step
To get started with DikuMUD, you're going to need a few things.
First of all, you're going to need a host machine to run it on. It's easiest if this is one you own, but it's also ok as long as you have permission. Running a MUD means that there will be network connections to the machine and the to do that it's going to have to listen for network traffic. Those owning the machine might not take kindly to allowing these network connections. There's security risk involved, and there may be a cost involved for the traffic itself.
The MUD will run on a wide variety of platforms, but is written using (distribution), a LINUX host.
==== Pre-requisites ==== - stuff that has to already be installed on the platform include
gcc/g++ flex/bison (sudo apt-get install bison flex) boost devel (sudo apt-get install libboost-all-dev)
For CentOS:
sudo yum group install "Development Tools"
should do it, but you may need:
sudo yum install boost-devel flex-devel
To download a copy, you can pull down a current copy of the software from GitHub with:
git clone https://github.com/Seifert69/DikuMUD3.git
While a lesson in using git is beyond the scope of this document, you're probably going to want a version control system at some point, and git is probably the most widely in use at this point. You could just download it in a package from GitHub and make a directory to unpack it to, but this will download the current version into a 'DikuMUD3' directory, create the local git repository, link it to the master on GitHub and give you an unpacked directory of files.
Compiling the MUD
Now on to getting it up and running. What you have is a bunch of files, but what you want is an up and running world. That means it needs to be compiled to run on your chosen platform and linked in with all of the local support libraries. There's a method to this madness.
How to build & launch
First build the binaries:
cd vme/src/ make all #
There is a flag (-j8) in the Makefile to compile on 8 threads in parallel. If you run into errors with the compile and you're on a machine with limited resources, this may cause a race condition during the compilation. Edit Makefile and remove this flag if the compile starts complaining about errors that should be reported to the compiler developers.
Make sure .def files are pre-processed:
cd ../etc/ make all
Then compile the zones:
cd ../zone/ ../bin/vmc -m -I../include/ *.zon
Running the MUD
Now you're ready to launch, the dev likes to four tabs in shell:
cd ../bin/ ./vme # tab1 tail -f vme.log # tab2 ./mplex -w -p 4280 # tab3 tail -f mplex.log # tab4
There's a number of ways to get multiple tabs - from multiple Terminal windows, to using screen if your host environment isn't running a graphical windowing system.
Tailing the logs are optional steps - you'll definitely need tab1 and tab3 for your MUD to run.
You can also run these commands in the background using
nohup ./vme > vmenohup.log & # This starts the MUD engine nohup ./mplex -w -p 4280 > mplexnohup.log & # This starts a Websockets listener on port 4280 that will connect to your MUD
This will keep the MUD up and running in a background process even if you terminate your login on your host.
You can also launch a telnet mplex using e.g. mplex -p 4242 And then telnet localhost 4242. But telnet is best for debugging
Connecting to the MUD
DikuMUD3 comes with a web front-end client. To open the client directly if you're on a windowed distro:
cd ../www/ firefox index.html
If you're going to be hosting the MUD, you should copy the files in ../www to your web hosted files directory so they are available to your users at your web address. (If you own the box, probably /var/www/html or something similar).
If you're using the web client, the distributed version doesn't point to your MUD, it points to the author's. Edit the index.html file and find all of the host references (including the ones in the urls like www.valhalla.com) and replace them with your fully qualified domain name, IP address or localhost and set the port to match mplex (4280 if you used that).
Once you load index.html in Firefox (or browser of choice), you'll have the quick link to connect or can manually input a websocket host to connect to. Press connect and you're connected to a game from the 20th century with 21st century technology!