Here is a link to the page with the server source code on it.
Here is a link to all the compiled code ready to roll.
If you do need to recompile for some reason just use make and it should do it all for you.
NOTE: gamesServer.tar is a tar file sontaining all the files in
the directory, so
you can just download it an untar it in a directory with "tar -xvf
gameServer.tar".
You can unpack this code and compile it in the burrow. You can run the server on the burrow too.
So go to the burrow or ssh into the burrow. If you go there open a shell aka a terminal from the start menu
To run the server first find an open port. To do this use "checkport [some port number]".
Example:
I want to check port 7777, so I type:
checkport 7777then it tells me in english if that port is in use. Go ahead and try port 7777. You will probably find it not in use because the server I have been running is on burrowww.cs.indiana.edu.
Next you need to find out what machine you are on. There are about 20 machines in the burrow. To do this type:
hostnamethis will tell me the address of the host machine you are on.
So lets say you are on marmot.cs.indiana.edu and you know port 7777 is free. You need to start the server on port 7777.
To run the server go into the directory where you have your compiled server code. One of the files in there is simply called Simulator. This is the "executable" of this program for unix. Type:
./Simulatorthis does not run the code but rather gives you a list of arguments that Simulator can take.
To run a continous game with unlimited players using the maze map start simulator like this:
./Simulator -p 7777 -m maze -k maze.packs &If you want to restrict it to only one player use:
./Simulator -p 7777 -n 1 -m maze -k maze.packs &See the difference?
OK, Remeber how we wanted to know what machine we were starting this server on? We wanted to know that because we have to modify the client code to connect to that machine on whatever port we are running the server. So in Prof. Sabrys code we are connecting to burrowww.cs.indiana.edu, but the server we have been working with in this example is on marmot.cs.indian.edu. So change burrowww to marmot. We are still on port 7777 so that doesn't have to change, but if we had chosen a different port it would have to change.
Now you have a running server and client rigged to connect to it. So lets talk about some helpful unix commands.
UITS software download website
In case you need it the adress for any machine in the burrow looks like this: [machine name].cs.indiana.edu