Adair Camacho - CPE 471 Final Project
Project Description:
For my final project I tried to make a game similar to the game Audio Surf, where a user is
able to control a spaceship while dodging objects in the ship's path. My version is not quite
a game, nevertheless users are still able to control the space ship's movement by using the up,
down,right and left keys. The user must try to avoid asteroids in the ship's path. If the user collides
with an asteroid then that asteroid explodes and the users briefly sees particles in the asteroid's position.
Implementation:
- My simulation initializes the asteroids' positions and stores them in a vector. Each asteroid is
also given an initial radius, also stored in the same vector. The vector used is of type Detect,
a custom class object. Similarly, the spaceship is given an initial position and radius. This data is stored
in a variable of the same custom class type as the asteroid. The scene uses a plane for both the bottom
and top of the rendered scene. All objects used are texture wrapped.
- The user is able to control the ship's movement along the x-axis and z-axis by using the up, down, right,
and left keys. Collision detection was implemented so that asteroids would "explode" when the ship
"crashes" into it. An explosion is simulated by copying the respective asteroid's position, deleting said
asteroid and scattering particles in the now deleted asteroid's position. Once a certain amount of time passes,
the particles disappear. When the user moves the ship, the top and bottom planes change along with the ship's
positions. Moving streaks appear on both planes, this was done by rotating the camera along the y-axis.
Project Screenshots:
The start of the simulation
An example of the program's collision detection. Here the ship collided with an asteroid
Resourses:
Asteroid object file: http://tf3dm.com
Space ship object: www.cgtrader.com file
Textures: http://www.deviantart.com/