breakout6 trimmed

by Steve S

Description

This plays the classic game breakout, where the player controls the paddle and attempts to break all the bricks and win. Key features: 0. Brick creation is automatic and relative to the screen size; the bricks are colorful 1. Introducing Noah, the smiling, moving obstacle that will slap down your shots before they even reach the bricks. But if you can get the ball past him, he'll help you knock down extra bricks. 2. Constants can easily be changed to change the size of the screen ball and paddle, width of bricks, vertical and horizontal brick spacing, value of the bricks, ball spin factor, balls per game, and winner/loser messages. 3. The user enters a difficulty level; higher difficulty makes a larger wall, shorter paddle and faster ball speed. 4. A scoreboard in the lower left maintains the player's score and number of balls remaining in the game 5. The score for knocking down a brick increases for the bricks closer to the top (and hence harder to reach and hit) 6. The starting velocity of the ball is randomized, as is the starting location of the ball 7. English (spin) can be applied to the ball; if the ball hits the end of the paddle, the ball's horizontal velocity is changed by a random multiplier to spin the ball. If the ball hits the left 10% of the paddle, the bounces bounces left; same for the right. If the ball hits the middle of the paddle, the spin is reduced. 8. Upon restart for the next ball, the spin is reduced to give the player a better chance at the start of the next turn. 9. When the ball hits a brick, it usually reverses vertical velocity (changes direction). However, the code checks to see if the ball hits the side of the brick and if it does, the ball bounces to the side (horizontally. This provides a more realistic bounce, physics-wise. 10. In between each turn, the program pauses one second and displays a message announcing the status of the game