Video Game Project
 
Racing Game
For the Computer Graphics HW4, I decided to implement a racing video game. I had decided to make a racing game before beginning on HW3, so I tailored much of the work in that assignment to get a head start on the final project. In The racing game, the user takes the point of view of a car driving down a street. The street moves through a city, where there are other cars that must be avoided. Other cars are essentially “enemy” objects which obstruct the completion of the game. The goal of the game is to reach it to the finish line in the fastest time.  
Final project for Computer Graphics, COMS 4160
A view of the city scene. The cars that are scene are “enemy” objects which the user can collide with and prevent the user from reaching the finish line
A view of the suburbs. The scene has changed from day to night, and the moon has risen. The light source is blue to simulate sunlight.
A view as you cross a bridge from the city to the suburbs
The edge of the suburbs displays some run down shacks and shrub bushes.
 
Photos
Features and Details
Basic Features
  1. Help Message : Printed to terminal output.
  2. Perspective, User Control, 3D Objects
  3. User input via keyboard and mouse: Forward and Back keyboard arrow keys move the player along the racetrack, Left and Right keyboard keys turn the player, Right and Left mouse clicks shift the speed of the player to higher and lower speeds respectively.
  4. Objects are lit with smooth shading
  5. Collision Detection: The cars in the above scene obstruct the user from moving forward towards he finish line. In addition, the user is restricted from driving off the street.
  6. Scoring System / Feedback: An overhead view in the upper right hand corner of the screen shows the current user and enemy car positions. The current time, speed, and distance left to travel is printed in the upper left hand corner. The finish time is printed in the center of the screen when the user reaches the finish line.
  7. Enemies: The cars that are shown above obstruct the viewer from moving towards his goal. The cars are animated to move up and down the racetrack.
  8. Several animated scene elements: Sun and Moon objects are flat shaded spheres that follow the animated lighting that is implemented. There is also moving clouds that are implemented as.
  9. At least fake shadows: Dark circles on the ground follow the enemy cars around the racetrack.
  10. A hierarchical character with moving parts: The enemy cars have wheels which move independently from the trajectory of the cars on the racetrack.
  11.  
 
Other Features
  1. Muliple Cameras: Done, dynamic Bird’s-eye view as described in the feedback system.
  2. Animated Lights: Done, Lights are animated as shown above so that a yellow light moves from above to the horizon, then a blue light rises and falls and the cycle continues. This lighting sequence is used to simulate the transition from night to day and back again.
The finish line is reached shortly after passing the edge of the suburb region.
 
Download
The visual studio c++ project and source files can be downloaded here. The project uses lib_3ds to read in 3DS files, and libjpeg to read in JPEG compressed texture images. The DLL’s and stubs are included in the zip file, so the project will compile and run correctly from all the files in the ZIP archive. The project also uses GLUT and the boost::shared_ptr implementation. These files are also included in the archive.