Assignment 3: Collision Detection

 

For this assignment, I have chosen to use static objects (in my case, these static objects are walls) and a movable one (a camera). The game I designed is really just a demonstration of collision detection in a maze. The maze I made is a really simple one that wouldn't take you long to find the way out. :) Basically, you'll have to navigate in the maze since you can't walk through the walls and when a collision is detected, the camera stops moving in that particular direction.

I used OpenGL to construct the maze (using polygons) and also mapped some textures onto the walls and the ground. Collision detection is done by testing a point against those of the static objects every frame. When the point is determined to be on or in the object, the camera will stop moving. This point is usually the location of the camera.

Credit is given to Allen Sherrod, www.UltimateGameProgramming.com, from whom I borrowed most of my source codes.

Snapshots of the maze:

 

                 

 

If you wish, you can download the source code here.

 

 

Hosted by www.Geocities.ws

1