Games use these elements to engage players. An effective game has a mix of these elements, making the game easy to play but challenging to win.

a Game Skeleton

Smiley Pong v2.0

SmileyPop v2.0

Summary

After mastering the concepts in this chapter, you should be able to do the following:

  1. Recognize common game design elements in games and apps that you use.
  2. Incorporate game design elements into apps that you code.
  3. Build a skeleton of a game by drawing the board and playing pieces and adding user interaction.
  4. Program collision detection between game pieces and keep score in an app or game.
  5. Display text information on the screen using the pygame.font module.
  6. Write game logic to determine when a game is over.
  7. Detect and handle keypress events in Pygame.
  8. Develop the code to start a new game or play again after a game ends.
  9. Use math and logic to make games progressively more difficult
  10. Add sounds to your apps with the pygame.mixer module.
  11. Display percentages and rounded numbers to keep users informed of their progress in a game.
  12. Understand the process of iterative versioning: adding features to an app one at a time and saving it as a new version (1.0, 2.0, and so on).

Challenges