Chapter 5. Using conditionals to build a two-player ball-and-paddle game

 

Pong was the first popular arcade game. For many people, this ball-and-paddle game was the first video game they ever got to play.

In the early 1970s, a new company named Atari hired a guy named Al Alcorn to make a game called Pong. They placed the arcade cabinet inside a restaurant in California, and by the next day, people were lining up to play it. When other game makers saw how much people loved Pong, they raced to make their own games. And the rest is history.

Which brings us to an important point: how did people know how to play if they had never seen a video game before? The answer to that question is the secret of Pong’s success. First and foremost, the point of Pong was easy to understand because it was a digital version of something the average person already knew: Ping-Pong. You hit the LED light back and forth between two “paddles.” In fact, the directions that came with the game gave a single objective: “Avoid missing ball for high score.” To rack up points, don’t miss the ball, as in Ping-Pong.

Preparing to program

Programming the cast-iron pans

Answer This: Why use the W and S Keys?

Programming the egg

Answer This: Does the Order of The Scripts Matter?

Answer This: Why Not Just Write One Script?

Programming odds and ends

Troubleshooting your game

Learning in action