Main Page | Recent changes | View source | Page history

Printable version | Disclaimers | Privacy policy

38.107.191.111 (Talk)
Log in | Help
 

Q2ai Installation Guide

From NEBL

Software:Quake2AI

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.

Retrieved from "http://nebl.cse.unr.edu/wiki/Q2ai_Installation_Guide"

This page has been accessed 311 times. This page was last modified 23:16, 25 August 2008. Content is available under GNU Free Documentation License 1.2.


[Main Page]
NEBL Home
Recent changes
Random page
Help

View source
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports