Project: Bouncing Hoover Craft

Write a simulation of a hoover craft-like vehicle trapped within the confines of a walled space. This will allow you to demonstrate that you understand the physics of collisions that we have been investigating.

Requirements

The vehicle should have thrust from only its "rear", so your representation of the vehicle must show its direction.

The user should be able to control the movement of the vehicle with three keys: 'w' to fire the thruster (apply a fixed acceleration for as long as the key is down), 'a' to pivot to the left and 'd' to pivot to the right.

There should be a constant, low-level "friction" (accelaration) that, if the user does not use the thruster, will eventually cause the vehicle to stop moving.

There must be at least 5 walls, no wall more than twice as big as the smallest.

There must be at least one obstacle inside the containment.

Extra Credit

Add a sound component to the simulation, using the code from chapter 8 of the text. Play a sound when the player uses the thrusters or the vehicle caroms off a wall.

To consider:

How will you determine when the vehicle has collided with a diagonal wall?

 

T