CS314 – P4 Writeup Tommy Siedlaczek KittyKart What • A 3D MarioKart clone. o All P4 required features + collision detection and animation. • Collision on ground, walls, items, other racers. • Animation on wheel motion, turning, and hit-by-item affects. o You can compete against an AI player, or play the game to set new best lap times. How • Singleton GameManager keeps track of karts, track and performing game functions. • Have track, kart and item objects in the game which hold their associated geometry loaded by GLM at creation. o All geo hand modelled in Maya. • GLM nicely keeps track of triangles, verticies, groups..etc This helps out in being about to use Locators in Maya for things like Item locations, starting points of karts, location of wheels on a kart for proper rotation w/r/t motion. Also helps in iterating over groups for collision detection. o For items, karts, an axis-aligned bounding box is setup by iterating over all existing vertices to find the min & max x,y,z. o These bounding boxes are stored with their respective object and checked for collisions each frame in GameManager::detectCollisions() o For the track, there are wall and ground collisions done similarly to Kart/Items, except iterated over vertices in a particular group instead of entire model. o Ground collisions differ as they use the bound-box check only to determine which polygon is being collided with. • Then that polygon is turned into a 3D plane equation in order to find the correct Y-location with respect to the x,z location of the kart. • AI was created by setting up AIPath locators in maya which are a line through the race course. These points double up as reset check-points when a player falls out of bounds, and actually triple up in their use as progress-measures for each lap. • The HUD simply renders text and a Quad with a texture of the item-picked up, if any. HowTo • WASD racing controls, spacebar=jump. E=use item o On the BIRD item, you must click E to activate targeting, then actually click on another kart in order to shoot the item. External Sources • MarioKart (Inspiration) • http://nehe.gamedev.net/ • http://www.3dcodingtutorial.com/ • http://www.lighthouse3d.com/ • http://www.xmission.com/~nate/opengl.html • www.backhouse.tk (BMPloader)