Q2ai Installation Guide
From NEBL
Contents |
Chicken Scheme
Make sure you have Chicken Scheme installed. If you do have it installed then you should be able to type "csi" and go into the scheme interpreter.
If "csi" is not found, then download chicken-2.6.tar.gz.
Install as root user
tar xvfz chicken-2.6.tar.gz cd chicken-2.6 ./configure make sudo make install
Install as non-root user
If you don't have root access, you'll need to install chicken into your path somewhere. If you don't have a path set up then make one in your home directory:
First, edit the file named .bashrc in your home directory and add the following lines to the end of the file:
PATH="$PATH:$HOME/bin" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/lib" LD_RUN_PATH="$LD_RUN_PATH:$HOME/lib" export LD_LIBRARY_PATH LD_RUN_PATH PATH
Now install chicken as follows:
tar xvfz chicken-2.6.tar.gz cd chicken-2.6 ./configure --prefix=$HOME make make install
Compiling the q2ai.ss Interface
Download the q2ai.ss file into your Quake2AI installation folder (probably ~/qtest).
You must now copy libquake2ai.so into your library path somewhere. If you have root access then you can copy it to /usr/lib but if you don't have root access you will need to declare the environment variable LD_LIBRARY_PATH to include some path in your home directory and put the libquake2ai.so file there.
Compile q2ai.ss:
csc -s -O2 -d1 q2ai.ss -lquake2ai
Now you should have a file named "q2ai.so" that you can load into chicken to do quake2ai commands.
Now type the following into the interpreter to test a sample bot:
(load "q2ai.so") (define AImain (lambda () (AIself.yawmove -1.0))) (quake2ai "+set name Bill")
This should launch quake2, and if you go into single-player then you should see the bot turning to the right.
![[Main Page]](http://nebl.cse.unr.edu/logo.png)