Server Setup

To set up the linux server and run the visualization of the Robots game you will first need to set up your hyplan page.

What isn't very clear in the desription the previous link provides is this:

Once that is done you will need to download this file and unpack it in your home directory. It will create a folder caller server and unpack into that folder, all on its own.

Then you will need to ssh into one of the linux machines in the burrow, their names are:

Now move into the server directory you just made (don't worry it appears on all the machines in the burrow so when you ssh in it will be there waiting for you). There is a file in there called "go3" use the command "more go3" to look at what is in that file. it should look something like this:

./Sim6.3 -p 7777 -o 4 -m pkgs2 -k pkgs2.packs -f 500 -v

Look familiar? It should, it is exactly the game we used in lab last wednesday. You can edit "go3" with pico or any other editor, thus allowing you to change the kind of game you want to play.

Now lets start the server. use this command:

./go3 > log1 &

This will start the server in the background. In this case it will wait for four players then it will start the game and put all the output into a file called "log1". If you want it to use another file name just change the argument between the ">" and the "&".

So once the game is over and there is log file named "log1" we execute this command at the command prompt in the server directory:

perl adump2html.pl -p pkgs2.packs -m 500 game1 < log1

In this command:

Ok, now back to that thing about the .html and .gif files. This command creates a .html file which is the webpage that you will put up in your hyplan directory and view from the web. It also creates a .gif file you will put in your hyplan directory. Those two files will be sitting in the server directory once you have executed the perl command mentioned above.

So let's move those files. In the running example we have they will be called "game1.html" and "game1.gif". So we would use:

There are two other files that needs to be in your hyplan directory and are probably still in your server directory. They are anim.js and adump2html.pl, so copy them both in there with:

You only need to put anim.js and adump2html.pl into your hyplan directory once.

Now that all that has been done lets set the permissions on game1.html and game1.gif, but first we must move into our hyplan directory where they are at. So use "cd /l/www/hyplan/"your username"/ to do this. Now run:

Ok, now lets watch the game. Go to www.cs.indiana.edu/~"your username"/game1.html


unknown
Last modified: Sun Dec 08 21:31:00 US Eastern Standard Time 2002