Viral Assault ------------------------------------------------------------------------------ Jeremy Johnson Eric Ketchum David Pecora ------------------------------------------------------------------------------ Overview ------------------------------------------------------------------------------- Viral assault is a Win95/98 application that was constructed using Microsoft's Visual C++ 6.0 compiler, Open GL, Glut for the windowing system, and the GlutMaster window template for C++ compatibility. (The GlutMaster template was developed by George Stetten and Korin Crawford.) The world consists of a 3-D polygonal model that represents the human heart and femoral artery leading to the heart. The world is inhabited by five types of enemies, three of which are texture-mapped. User input is through the keyboard, and controls the player's position in, view of, and interaction with the world. We implemented directional lighting, as well as smooth shading to make the walls of the heart appear realistic. Features ------------------------------------------------------------------------------ Occlusion Culling: We use occlusion culling to partition the world into regions and only draw those polygons that are close to the player, significantly reducing redraw time by ensuring that OpenGL only processes a small subset of the world per frame. This culling is also used to reduce enemy processing time for those enemies that are far away from the player. Level of Detail: We have ten decimated world models, with the polygonal density of each model separated by a factor of 2 (i.e.: a 2000 polygon model, 4000 polygon model, ...). The currently used model can be dynamically changed during the game, and also automatically adjusts during intensive portions of the game (for example, upon entering the heart). Control Panel: The control panel indicates the current game state and time. We also use scrolling text extensively for the intro sequence. The control panel functionality uses Nate Miller's glTexFont library, which can be found at http://members.home.com/vandals1. Collision Detection: Collision detection tests range from simple spherical intersections (such as enemy-shot) to more complex tests for intersection with the world model. Collision detection with the world model consists of several steps. The triangles in the world model near the player (or enemy or shot) are first segmented out of the world model. A rectangular box surrounding the desired player motion is calculated. The transformation required to transform this rectangular box to a cube centered about the origin is calculated, and used on all the segmented triangles. The triangles are then sent to an algorithm obtained from Graphics Gems III, a fast triangle-cube intersection test. The following collision detection types are implemented: - Enemy with player - Enemy with enemy - Enemy with world model - Player with world model - Enemy with shot - Shot with world model A variant of the Graphics Gems ray-sphere collision detection algorithm is also used by the shot-evading enemies, but is suitably modified to take the size of the shot into account. Most enemies are generated at random positions near the player (but within the world model) by a customized algorithm which uses, in part, the Graphics Gems ray-triangle collision detection test. Sound: We implement a dynamic, buffered sound system that adjusts the heart beat based on nearness to completion of the game (which adds significantly to game ambiance). We also include sounds for the following events: - Shot fired - Enemy killed - Damage taken by player - Shot powerup collected - Extra life collected - Player death - Player victory AI: We have implemented several enemy AI models. These include geometry-based shot-evading enemies, as well as enemies that cluster together to ambush the player by attacking simultaneously. Enemies are also often generated in out-of-the way corners of the model, with the idea of attacking the player from behind. Game Content ------------------------------------------------------------------------------ The world model was obtained from an MRI scan. The original scan was segmented to only include selected intensity values. Neighboring pixels were grouped together, and all groups but the largest were removed. The largest group consisted of the heart and vasculature down to the femoral arteries. The model was then converted to a triangle model. The original model had roughly 240,000 triangles, requiring decimation before becoming useful for our game. The model was kindly reduced to 10 levels of detail by the makers of Rational Reducer, a piece of commercial software available from http://www.sim.no. The molecular-looking enemies and boss at the end of the game were obtained by converting appropriate models obtained in the demo version of WebLab ViewerPro, available from http://www.msi.com. All other enemy models were hand-generated and texture-mapped. Sounds were obtained from a variety of sources on the Internet. The varying pulse rate was created by resampling one cycle of a heartbeat. How to Play the Game ------------------------------------------------------------------------------ This game is designed for smaller resolutions. It works best at its original window size of 400x400 or at full-screen 640x480. First, read the cool story on the title screen :-) You can hit the space bar should you wish to bypass reading the message. In any event, the game will then start. You will seem to be inside a large tube, which is the artery leading to the heart. Keystrokes are as given in the title screen and are repeated here: n - New game q - Quit Arrow keys - Turn in the associated direction e - Move forward d - Move backward s - Shoot + - Increase level of detail - - Decrease level of detail The basic idea is to reach the heart and induce heart failure by killing the boss. You will accomplish this by reducing blood pressure (BP on the control panel) to zero. Note that the blood pressure will decrease by one every time you kill an enemy. However, it will only drop so much this way - you have to reach the heart and face the boss to win the game. You also should keep track of: - The number of lives you have left (denoted by "Virii" on the screen). When this number reaches zero, your virus will suffer a horrible demise, which will be explained in gory detail by the helpful computer. You can increase your number of lives by collecting life power-ups, which look like small green gems and are scattered throughout the model. Explore around and you will find more of them. - Your shot power up level (denoted by "Injct" on the screen for Injection Power Level). This can range from 1 to 5; the higher the power level, the bigger your shots (making it easier to hit your target) and the more damage they will do to the boss. You can find shot power-ups, which look like small purple donuts, scattered throughout the model. Once you reach the heart, keep shooting the big bad boss as much as possible. Things can get tougher here since normal enemies are generated more often. You will at this point probably notice your limitation of 10 active shots at once, if you haven't already. Best of luck! Cheat codes ------------------------------------------------------------------------------ What? You want to cheat? :-) The faint of heart can toggle the cheat codes by pressing *. You will then have the following nice options available to you: h - Warp to heart a - Add extra life p - Add shot powerup g - Generate an enemy nearby c - Generate an enemy T-cell cluster nearby We hope you enjoy the game! - The Viral Assault team