Pygame Tutorial Challenges

Your assignment is to add things to your completed Pygame tutorial game.   Don’t forget to make a copy!  For each thing you choose to do, do a little planning.

  1. What variables (if any) will you need to add?
  2. In what sections (setup, events, movement, drawing) will you put what code?

Here are some ideas for improving the game.

  1.  Make it a game.  Right now, it doesn’t matter if you miss  the ball.  What should happen?  You could have a number of  lives, and put the number of lives remaining in the top left.
  2. When  the game ends, stop the ball from moving and write “Game Over” in the middle of the screen.   You could  make a new variable, or you could use the lives variable from #1.
  3. Change how the ball bounces off the paddle or bricks.  Add some randomness, or make it depend on what part of the paddle (near the center or edges) the ball hits the paddle.  Or make it matter if the paddle is moving.
  4. Make the ball speed up as the game proceeds.  You can do it by time, or bricks.  Or you could have levels.
  5. Add sound effects (use headphones).
  6. Use some images to replace the ball, bricks, or paddle.  You’ll need to really understand image sizes to get this right.
  7. Something else.  Powerups?  Some bricks drop stuff on you that you have to avoid?  Make it so you have to hit each brick multiple times to get rid of it?

Save your completed game as  If you use images or sounds you need to turn in a whole folder of stuff, or I won’t be able to run your game.  If you make more than one, save the additional ones as,  etc.