Simple 2
- This is a simple crystal space game.
- It's a room (with no boundary detection) with
one object, a user, and the agent.
- We wrote this here at Middlesex as a modification
of the simple2 tutorial that Crystal Space provides.
- We're thinking about making a simpler version of this (i.e.
a standalone executable), but as it stands you should down
load the
Crystal Space Stable Version 1.0.1 from Feb 2007.
We had problems installing it over an earlier version. We hope you
don't.
- It is tricky to get crystal space running. If you've done it
before move on. If not, (this will take several hours)
- you can get the Crystal Space from
crystalspace3d.org tar.gz file
- Follow the directions on the building and installing manual link
- Go to 2.4. and the 2.4.4 Platform specific instructions using
Windows and cygwin.
- If you're installing cygwin it probably will work better if you
install the default except add all devel and libs.
- We've done all the crystal space stuff in cygwin. You should
be able to do it in other environments but cygwin is great,
and it worked for us.
Once you've got that up and running, it should be pretty easy
to get our simple2 code running. Get the
code and untar it (tar -xvf csCabot1.tar).
Stick the simple2.cpp and simple2.h files in CS/apps/tutorials/simple2
Keep a copy of the originals if you like.
back in CS, do a make simple2 (you should be able to use the build
process that comes with CS, but we're old fashioned and did it this
way).
You should now be able to run simple2 by simply doing ./simple2.exe
from the command prompt in CS. I get a runtime error, beacuse you
still have to put in the sprites
and set up the paths.
Put in the sprites The objects in the scene (a pyramid
or a stalactite) are not correct. We've built two and they're
included in the tar file above. You need to put them into the
CS library.
Go to CS/data and add the two sprites (chrispyramid and
chrisstalagmite) and add them to the standard.zip file. I've
got winrar which lets you do it, but you can unzip the file and
then rezip all the contents along with the two sprites.
Setup the paths. CS communicates with the CABot agent
via a series of files. These files have to be stored in a
directory that the two systems agree on. I usually put
them in ../CANT23/cabot1/data.
From the crystalspace perspective, all that is needed is to modify
the vfs.cfg file. The tar file includes my version of it, but it
is probably best to edit the one you already have. The relevant
line to add is the VFS.Mount.cantAgent line about 20 lines down.
You should now be able to run and communicate with the CABot agent
Note you can run without the agent and modify the text files by hand.
Running Simple2
- Simple2 is an obvious modification of the simple2 code tutorial
that comes with CS.
- When it comes up you should see the agent and an object (pyramid).
- The user has a body (which you can't see), and you can move
the agent around with the arrow keys.
- You can look at the agent's view by using the F2 key.
- If you type in text commands, they get passed onto the agent when
you hit return.
- Commands that work include Move forward., Move backward, Turn left.,
Turn right, Go left., Go right., Turn toward the pyramid.,
Go to the pyramid., Turn toward the stalagtite., and Go to the
stalagtite.
- These commands should make the agent move if the CABot1 agent
is running correctly.
- Note that CABot1 takes a long time to parse a command (around 1000
CABot cycles with time varying on your computer.)