Running CS 351 MUD program

Preliminaries

The MUD game is set up to handle 1-4 players. If you want to add more players, you can copy and modify the description files.

Each player must be logged onto the same computer. They can be different users/accounts. They don't need to be CS 351 students. One person, the controller who will run the MUD executable must be a CS 351 student. The controller can also be a player.

We assume that the controller has the shell variable CLASSHOME defined as in

 
weise: setenv CLASSHOME /afs/cs.uwm.edu/users/classes/cs351

Preparing the players

Each player needs to have a window to run MUD commands in. The easiest thing to do is for each player to run $CLASSHOME/cmd/slave-term. If the player is not a CS 351 student, they can instead start up a new window using xterm, and then run three commands: (1) to inquire what the window's tty is, (2) to enable the MUD to access the tty and (3) to put the shell to sleep:

weise: tty
/dev/pts/11
weise: chmod 666 /dev/pts/11
weise: sleep 9999

Controlling the MUD

Once each player (including the controller, if they want to play) has a window, the controller starts the MUD program with the correct number of players (e.g. 3):

weise: $CLASSHOME/bin/mud $CLASSHOME/lib/city3.mudml
The MUD program will then ask for the tty for each player:
Please give the tty to use for player feckless wanderer [/dev/null]: 
The controller must type the full tty for that player, e.g. /dev/pts/11 and then presses RETURN. If the controller instead only presses RETURN, then that character (in this case, the wanderer) will be ``dead,'' and not be activated by any player. If the controller makes a mistake, they can press Control-C and start over. The players should NOT press Control-C; the players do not control the program.

Playing the MUD

Each player gets a turn in order. Commands such as inventory and look don't use up a turn. If you have a prompt, everyone (as well as the program) is waiting for you. If you don't want to do anything, type rest. To quit, type quit.

The controller can kill the game by pressing Control-C. This won't work in a player window since thwplayers are not running the game. When a player quits, they are given a score. The one with the highest score wins. NB: after you quit, your ``dead'' body lies around.

If a player presses Control-C by accident, it will kill the window if they used the slave-term command. If the player did the window by hand (using ``sleep'') it will wake up the shell. In the latter case, the shell and the MUD will fight over who reads the shell input, which leads to chaos. The player should type sleep 9999 twice, and one of the lines will get to the shell and put it to sleep. The MUD will get the other and complain it doesn't understand sleep. That's OK