95.402 Winter ‘99 Assignment #4

Collision Detection

Due: In 2 weeks Monday Nov 8, 1999 in assignment box or in demo lab.

 

  1. Separate your code into two: the builder (or world maker) and the game (the run-time engine). The builder outputs your worlds and the game inputs them. Note: you can use any techniques you like for reading/writing; e.g., stdio (fprintf, fwrite, and fread) OR << and >> if you don’t like the serialization approach used in the sample game.
  2. Build collision detection facilities at least for the ground you can navigate on (a static object). There are no games where you can fly anywhere you like with no gravity and no obstacles to hit. You need this if you’re building a racing game, a shooter, an underwater game, a role playing game, an adventure game. Even a flying game can result in crashes into mountains or with the deck of a ship, etc. Design your game so that you need collision detection.

 

Note that you are only doing the bare minimum. Since collision detection in general is very difficult to do well, any demonstrable collision detection facility will do.

PS: What collision detection facilities requires you to have is explicit data structures for objects/faces that you can traverse. You can’t build collision detection facilities if you can’t get the faces of an object or if you have transformations that move static objects around but you can’t explicitly compute the transformed faces.