By Dr. Angela Yu
Day 22 of 100: Build Pong - The Famous Arcade Game
Using Turtle Screen capabilities, program the classic arcade game Pong where two users can play against one another.
This application is written with Python 3.11.
This game application features a randomly moving ball and two paddles: one on the left and one on the right. The object of the game is to bounce the ball off of your paddle so that your oppenent misses, socring you a point.
The score is tracked for each player at the top of the screen.
This project uses three classes:
- Ball
- Paddle
- Score
The right hand player controls the movement of the paddle up and down by pressing on the arrow-up
and arrow-down
keys.
The left hand player controls the movement of their paddle up and down by pressing on the w
key for up, and the s
key for down.
Once a player correctly move their paddle to bounce the ball, the ball does two things:
- Changes direction toward their opponent
- Speeds up
If your opponent misses the ball, you get a point.
All of the commands below should be typed into the Python terminal of your IDE (I use PyCharm for my Python Development).
First, clone the repository from Github and switch to the new directory:
$ git clone git@github.com:shelbyblanton/pong-game.git
Then open the project in PyCharm.
Setup is complete!
Click Run in PyCharm to see the app in action.
Programmed by M. Shelby Blanton under the instructional guidance of Dr. Angela Yu via Udemy.com.