README ********************************************************************* Title: Hyper Rodent Authors: Matt Garr and Brent Villalobos Platform: Linux (Sweet Hall Firebirds w/sound) ********************************************************************* Running the Game: Make sure you are in a directory that has both the Makefile.linux and MakefileEditor.linux and has all the necessary .c and .h files. To compile the game type: "make -f Makefile.linux" To run the game after you've compiled it type: "rodent.linux" or "rodent.linux [level file]" To compile the level editor type: "make -f MakefileEditor.linux" To run the level editor type: "leveledit.linux" ********************************************************************* Playing the Game: The game is played by moving your mouse (rodent) around and eating the pieces of cheese that are set on the board at random locations. However, you cannot run into any walls or obstacles on the board, nor run into the cat. As you eat more pieces of cheese, you get more points and get closer to solving the level. However, you also start moving faster making it harder to avoid obstacles. There are bonus pieces of fruit that randomly appear on the board. When you eat one, your mouse will become temporarily invincible allowing it to run through walls and the cat. Colliding with walls while invincible will make you bounce off in the other direction. Keyboard commands: Turn left: 'j' Turn right: 'l' Turn around: 'k' Pause: spacebar All in-game features can be controlled by clicking on the "Control Panel" icon at the top of the screen. You will then have a menu which can control the visual elements of the game and the game parameters such as mouse speed, cat speed, number of lives, number of cheese slices per level, your viewpoint, rendering effects, and bonus frequency. Level Editor: There is also a level editor packaged with the game. You will be able to create your own level and then save it to a file. Keyboard commands: Move left: 'j' Move right: 'l' Move up: 'i' Move down: 'm' Toggle obstacle: 'z' Toggle grid: 'x' Clear board: 'c' Move starting mouse position: 'v' Change to 2D edit mode: '1' Change to 3D preview mode: '2' Save to a file: 'a' Append to a file: 's' In 2D edit mode: Along with the keyboard commands, you can also move the mouse to select squares and you hold down the left mouse button and drag it to lay down whole strips of obstacles. By dragging the mouse over existing obstacles, you remove them. In 3D preview mode: Aside from moving with the keyboard, you can click and move the mouse to spin the board to get different viewpoints. A note about saving: There are two ways to save. If you save using 'a', then that will start a new world file of the name you choose. If you choose 's', then that will append to an already existing level file. If you save using 'a' and that file already exists, then it will be overwritten with the new data. If you choose 's' and the file does not exist, a new file will be created. Also, the game only supports a maximum of 9 levels per file currently. *************************************************************************** Advanced Features: Sound: There is event-based sound in the game for when you: eat a piece of cheese, eat a piece of fruit, hit a wall while invincible, crash into a wall/obstacle, solve a level, or run into the cat. Also, if you have mpg123 installed (which the Sweet Hall Firebirds do), there is an in-game sound track as well. There is also positional audio for the cat. As you move around the board, the cat will purr out of different speakers depending on where it is in relation to the mouse. The sound is implemented using libgaudio v1.5. Make sure you have gaudio.c and gaudio.h in the same directory as your make file. Level Editor: There is a level editor supplied with the game which allows you to make your own custom worlds. It also has event-based sound and can be used with either a mouse or keyboard (see above for commands). The levels are outputted to a file which can be loaded into the game in two ways: either at the command line or in the Control Panel. Advanced Rendering Effects: These include multipass rendering of both shadows and reflections. Reflections are implemented through using a stencil buffer to only allow the floor to reflect. We then invert the walls, obstacles, and characters, and draw under a semi-transparent floor. Shadows are rendered at one pass-per-shadow. You can select from either one, two, or six shadows, which corresponds to the principal light, the principal and secondary lights, and all the spotlights combined with the other two. To implement shadows, we draw in the stencil buffer of the floor, and every time we draw a polygon's shadow in the plane, we mark it out so that we do not get doubly dark shadows from a single light source. I looked a the dinosaur example linked off the "way cool rendering effects" on the course web page, and followed their model for computing the matrix to transform the shadow into a plane. In-game Control Panel: The control panel, and on screen displays were built from scratch, using many images we created in Adobe PhotoShop images for the buttons and sliders. Sliders were implemented by calculating an x value for the "cheese" slider-pull, based on the (min value) + (current value)/(max-min). ****************************************************************************** Game Content: Sound: Sound libraries were supplied by libgaudio. Sound files where found in various places on the Web, but mostly at www.wavecentral.com and the in-game music comes from Brent's personal audio collection. Textures: Textures were found in various places on the Web in .jpg format and then converted to .rgb format using xv. Models: Models were found on various Web sites. Special thanks to Nick Presley who created the mouse model and modified our cat model using Caligari TrueSpace3 v3.0. ******************************************************************************** Sources: For help on shadows and reflections: http://reality.sgi.com/mjk/tips/TexShadowReflectLight.html Sound library by Andreas Schiffler found at: ftp://esc1.zkm.de/pub/libgaudio/