Python: Building a Pong Game
You may already know how to play Pong in real life. How about building your own version of Pong on your computer? In this tutorial, we will learn to use a library in Python called Pygame to build Pong. Sounds fun?
The goal of this workshop is to use your existing Python knowledge to fix the code where indicated to make the game work and learn about the Pygame library and its functions along the way.
Table of Contents
Sections
- Activity 1 - Define the width of the Pong screen
- Activity 2 - Change the color of objects in game.
- Activity 3 - Change the key assignment to move left paddle
- Activity 4 - Change the key assignment to move right paddle.
- Activity 5 - Declare and use a variable for font
- Activity 6 - Fix the 'if' condition to track correct score.
- Activity 7 - Define the key combination to exit the game