Entropy Installation for CS381 Students

From LagoonWiki

Jump to: navigation, search

This page holds instructions for installing the Entropy game engine on the Game Laboratory machines. It presupposes that the system administrator has already installed some supporting software. (If you are installing Entropy on your own computer, follow the other installation link on the Entropy page.)


Contents

Overview

You will install entropy in /cs381, which is on the Laboratory machine's local disk. If you move to another system you will have to install it again. (You may want to go ahead and install it on a second system, so that you will have one that is ready to use if you come in to work on it and the original machine is down, or occupied.)

Since /cs381 is on a disk that is only visible to one machine (and since it is not backed up), it is essential that you keep all the assets that you create in you own directory tree. In class we will talk about writing a simple script to copy your assets into the engine's directory tree. If you ever have to move to a different machine you can just install Entropy on it and run the script to grab your assets.

Procedure

  • Log in on a machine in the Game Laboratory.
  • In /cs381, create a directory for your team:
pushd /cs381
mkdir <teamname>
pushd <teamname>

where <teamname> is whatever you want to call the directory.

Do not under any circumstances modify anything under another team's directory.

  • Check out a copy of the engine from the repository:
svn checkout svn+ssh://pine.cse.unr.edu/grads/miles/svnroot/entropy_gdp08s entropy
  • That will create a subdirectory named entropy/, where you will do most of your work:
pushd entropy
  • You need to modify your library search path in order to compile the system:
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH
  • You should also put that command into your ~/.bashrc, so that you will not have to type it in every time you log in.
  • Build the engine:
make
  • This took about six minutes on one of the Game Laboratory machines. – Bdbryant 12:40, 7 February 2008 (PST)

Running the Example Game

Test your installation by running the example game:

python go.py galaga

"Galaga" is the name of an example environment. Part of the environment will be loaded from the galaga/ subdirectory, and the rest will be loaded from the default area data/common/. For the class you will have to copy your assets into specific places under those directories, and modify some of the files that are already there.

The test will pop up a window with a camera and a default skybox. Use the arrow keys on the keypad to move the camera vertically and horizontally. (The horizontal moves will also tilt the camera, for reasons to be explained later. You can use the + and - keys on the keypad to "spin" the camera any way you want it.)

When you tip the camera down you will see a Space Invaders type game in progress at the bottom of the skybox. That is part of the Galaga demo. We will replace it with other things over the course of the semester.

Press esc to exit. The exit is not very clean yet; if you do not get your prompt back, press control-c to kill it.


Updates

From time to time your instructor may announce that some component of the game engine has been modified. You can get the modifications from the repository thus:

pushd /cs381/<teamname>/entropy
svn update

If the modification involved any compiled code you will also need to recompile the engine:

make

If time allows we will talk more about working with a repository later in the semester.