Chapter 8. Designing a one-player ball-and-paddle game

It’s a boring Saturday afternoon, and all your friends are away. You decide to entertain yourself by shooting some goals into the soccer net in your backyard. How many times can you kick the ball into the net shown in figure 8.1?
Figure 8.1. A game of Dribble means making a grassy field backdrop, red shoe, blue ball, net, scoreboard, and barrier line running across the bottom of the Stage.

Dribble is a ball-and-paddle game based on the famous Atari hit Breakout. In Breakout, you control a line that represents a tennis racket, and you need to hit a single, white pixel—the ball—at a wall made of rainbow blocks. The section vanishes when the ball hits the “bricks.” Dribble plays with the theme by turning the rainbow blocks of Breakout into a black-and-white soccer net. Instead of a white dot, ball, and line paddle, you have a blue ball bouncing off a shoe. Players rack up points by removing sections of net whenever the ball hits one of the black or white blocks. The game ends either when the board is cleared or if the player misses the ball three times.
This chapter will teach you how to make all the sprites you’ll need for the game—and make them come alive by giving them texture, such as building smooth surfaces or rough surfaces out of pixels. Images are bland without texture.
In this chapter, you will learn