Lab 8: Crystal Space Mazing
- Today we're going to use the Crystal Space Mazing tutorial.
- Open up crystal space in visual studio. (Open the project that is
supplied (wktypicals?).
- Mazing should already be built, so select appmazing, and
run (right mouse on appmazing and select debug).
- You change direction with the arrows, move forward with w,
and shoot with the space bar.
- Let's change it a bit to show you what's there.
- You'll note
that where you start, the light is red (turn left or right).
- In gamestuff.cpp, find the first call to CreateLight and
change the csColor(1,0,0) to csColor(1,1,1).
- Rebuild, and you should now have a white light where you
start.
- Let's change the walls.
- Find the bit in Maze::CreateGeometry where you LoadTexture
stone4.gif. Change the stone4.gif to plaster.png.
- Rebuild and go.
- note that in the cs/data directory, there is a file
standard.zip. You can replace stone4.gif with any of
those graphics and it will tile universally.
You can even put your own in.
- Check out the documentation.
- You can find the API and the manual in the cs/docs directory,
- or you can find them
online .
- Feel free to check out the user groups. Did they ever
answer my question?
- Now lets get down to it. I get really confused by the 3D room
structure. Let's get rid of the upper levels.
- In Maze::Maze get rid of the z loop. This kind of
leaves the top two layers there, but not really.
- In CreateMazeGeometry, add the ceiling to all of the
first floor. In the createRoom calls, replace the first
# with a ..
- In createAdversaries, remove the two from floor 1 and 2.
- In CreateMazeGeometry get rid of the y loop, remove
lights with y>0, and CreateRoom with y>0. (I added
lights to all the remaining rooms to see.)
- Save this. We'll start next week from here.
- Play around a bit
- Make more of the adversaries.
- Make them smaller or different textures.
- Change their behaviour.
- See if you can remove some walls.
- Can you make walls different tetures?
- Play with the lighting.
- Next week, we'll add more rooms.