In a previous assignment, I decided to recreate a game, which is more of an appropriate project for the midterm as an OOP assignment. However, this is the perfect opportunity to recreate the game with components that make it more like the real game.
Components that are necessary for recreating the game are (1)adding the keyPressed function so that the mouse is no longer controlling the car, but the space bar to drive forward, and left and right arrow keys to move left and right, (2) add a component so that when the cars crash the game is over and restarts, (3) it might be ambitious but to recreate the car crashing sound effect, but it could also be that I have car sounds in the background which I have found different effects here. Visually, I would like to make the cars look more realistic by adding a roof to the car using the push and pop component or simply adding a rectangle of a different color on top which I played with but wasn’t successful. Finally, I of course want to add the direction/start page, which like the car sounds would make a sound with every button the player presses on, and make the car start in a lane and not on the bottom left corner.
At this point, this is where I am:
You could also use images of cars from the top down instead of using rectangles. That would probably look good. I think you’ll probably want to make it so cars can’t run over top of each other and points are deducted when a car runs into another car.