Super Luigi Kart

By Sean Teeling

For My project I decided to create a driving game. In the game the user drives around the track and jumps off of ramps. 'w' moves forward, 's' is brake/reverse, 'a' and 'd' are right/left, and 'space' is boost. The game uses life-like acceleration until the car reaches its top-speed, and deceleration when the user lets go of the gas, or brakes. The game features a HUD with a red bar representing health, and a green bar representing boost. The player loses health by driving off of the track and on the gravel, or by bumping into the rails. I used collision detection to keep the car in bounds when the car bumps into a rail. When a car is on the dirt, it "bumps" up and down by increasing/decreasing its y-position. The car also decelerates when not on the track.

Collision detection was used to tell if a car was going over a ramp. If it detected a collision, the car's pitch was increased to 45, and the horizontal speed was cut down. The vertical speed was given by sin(pitch) * currentSpeed. And the pitch decreased each frame rate until it reached the ground. Contact with the ground changed the angle of the pitch to make the car bounce up and down (ie: oscillate with a large dampening force until it stopped bouncing).

All of the obj files were handmade, with the exception of the car which was made in blender. The track is a circular track inscribed in an octagon as the outer guard rails and with an octagon inscribed in the center of the track as the inner guardrails.

Coming off of ramp
Driving towards ramp
Collision with guardrail
Driving on gravel
Driving