This homework assignment is optional. Do it if you wish to improve your homework average. Only catch: if you do it, you also have to grade it (as usual on CrowdGrader).
You have to build a game. The screen looks like this:
You control the car by tilting the phone. The "no acceleration" point should be when the phone is tilted about 30 degrees towards the user, in a comfortable viewing position. You accelerate the car by tilting the phone:
You have to model the forward / backward by accelerations, using a real dynamics model that has position, speed, and acceleration variables, as we did in class e.g. for the graph (please see again the tutorials in Lecture 9 and Lecture 10).
For side to side movement, it's probably best to use acceleration, but feel free to use different friction constants and acceleration constants than for back and forth. Make it feel good.
The forward speed of the car is represented by the road sliding under the car -- the car does not actually move forward on the screen. The car can move side to side, but it stops (does not bounce) when it goes to the left or right street limits; it never goes out of the road.
On the road, every now and then, are potholes (see image). The driver has to avoid the potholes. The goal of the game is to drive as long as possible (as many miles as possible) without hitting a pothole. When the driver hits a pothole, the game begins again. The game logs and displays the number of current miles driven (see image, top right) and the max for the player (top left).
Try to make the game entertaining! You are free to upload it to the app store of course.