Project: Bouncing Hovercraft

Write a simulation of a hover 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. You may use any programming language or engine so long as you are writing the code that simulates the physics. (The project can easily be solved with standard Java.)

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 (boost the velocity by a fixed amount in the direction the vehicle is pointing), 'a' to rotate to the left and 'd' to rotate 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.

There must be at least one obstacle inside the containment.

Graduate Credit

At least one of the walls must be sloping (diagonal). I should be able to set the angle of that wall to be between 0 and 30 degrees. You must provide and document a mechanism that will allow me to set this value when I run the program.

Extra Credit

Add a sound component to the simulation. Play a sound when the player uses the thrusters or the vehicle caroms off a wall.

To consider:

There is quite a lot of code on the Web for things like a bouncing ball (e.g. http://www.leepoint.net/notes-java/examples/animation/40BouncingBall/bouncingball.html) If you are not familiar with interactive java GUI's, you might check those out. Just make sure you cite code that you modify.

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