The Deadly Soccer Ball

CS248 (Graphics) Video Game competition, Fall 2005, Stanford University 
Jean-Gabriel Morard

##### PLEASE VISIT http://www.stanford.edu/~jgmorard/cs248/ #####


DOWNLOADS AND INSTALLATION

An executable for Windows and sources and a Makefile for Linux are available from http://www.stanford.edu/~jgmorard/cs248/.

On Windows, unzip the zip and preserve the file structure (do not move files around.) Then double click theDeadlySoccerBall.exe to start playing.

On Linux, expand the archive and make:
    tar -xvzf theDeadlySoccerBall.tar.gz
    make
Then run ./theDeadlySoccerBall to start playing. It won't work if you don't have openGL and SDL (available online)


GAMEPLAY

You're driving a spiky soccer ball on 6 planets and you have to go and kill a number of targets.

The planets are spheres with holes, and those holes are star gates which you can use to go from a planet to another. You'll know where a given hole will take you if you look at the color of the ground in the hole (planets are color coded) or on the radar.

To kill a target, you have to first shoot it with a missile so that it loses its spikes, and then go and roll over it before the spikes grow back. When a traget is hit by a missile, its spikes fall on the ground and form a spiky bush. If you touch either a spiky target or a bush, you'll get hurt badly. But shooting bushes will clear your way and increase your score.

You'll be meeting snakes as well. Snakes can't harm you and you can't kill them, but they'll make your life harder because both you and your missiles will bounce on them, while targets can go through. Beware that your missiles can hit you after they ran around the planet too, and that your missiles will go through the holes as well, so that nowhere is safe.

You're playing against the clock here: every 30 seconds a target will autodestroy (you're starting with 26 of them) so you'd better get them quickly. If you catch them all in less then 8 minutes, you get a time bonus.


THE RADAR

The radar is a great help and you should keep an eye on it. It shows you everything on your planet: the targets, snakes, bushes, and your missiles. Near the end of a game you'll want to look at the target tags on the bottom right of the screen as well. Their colors tell you which planet each alive target is currently on, so you know where to go if their's no one on your radar. The tags change into smileys when you kill a target.


CONTROLS

    * Arrows let you move around
    * Shift makes you move faster
    * Ctrl shoots a missile
    * Space kills all the missile you shot
    * "R" shows or hides the radar
    * "S" turns on or off the sounds
    * "P" pauses the game
    * "M" shows or hides the polygons mesh
    * Esc quits the game


FEATURES

    * Procedural model enabling for fast level of detail control and frustum and occlusion culling: the planets are based on an icosahedron (20 faces, 12 vertices.) Each of its faces are recursively partitioned into four subtriangles when the game is loaded. I only compute coordonates for 2 original faces of the icosahedron: the first I map onto the surface of the sphere, the second onto the surface of a hole. I then rotate one of these 2 polygon meshes to each of the 20 directions of the icosahedron's faces and draw. During precomputation I preserve the tree organization of my polygons, which enables for easy level of details control (because I can draw down to a certain level of the tree only) and culling (because I can prune a whole subtree at once if I detect it to be unvisible.)
    * The snakes are also generated procedurally, and at run time since the number of shapes they can take is huge. It is a tube whose axis is a sinusoid mapped onto the surface of the planet. Every few frames I take a slice of the snake at the tail and move it in front of the head, so that very few coordonates need be recomputed. The texture then slides slowly on the body, and it looks right.
    * On-screen control panel: the radar is an orthographic projection of your planet. It shows the whole planet and everything on it because it its faces are transparent. Additionnal onscreen indicators include target tags, time and score, and your health bar.
    * Explosions are rendered by mapping a fire texture onto a sphere, and having its radius and alpha coordonate vary over time. Smoke tails behind the missiles are rendered the same way, but without texture (missiles are fast and it looks alright.)
    * Collision detection: missiles and the soccer ball are tested for collision against everything else. This is made faster by only considering objects situated on the same planet, and in the snakes' case using bounding volumes and then finding the point of collision by dichotomy. 


RESOURCES

I got my textures from http://astronomy.swin.edu.au/~pbourke/texture/.
I got my sound effects from http://www.partnersinrhyme.com/pir/PIRsfx.html.
I used code from http://www.libsdl.org/intro/usingsound.html to play sounds.


Latest update: December 7, 2005