top of page

Python Game Series: Pong

Today, we're going to learn about a super fun game called Pong and how it's made using a programming language called Python. Pong is one of the earliest video games, and it's like table tennis.


A two-player game where each player controls a paddle to hit a ball back and forth. This game involves handling user input, collision detection, and simple physics.


pong

Get the code





The main part of the game runs in a loop. This loop keeps updating the screen, checking for player inputs (like moving paddles), and updating the ball's position.


Also pay close attention to the game setup, game() function. This part sets up the game screen, shows the splash image, and gets the player names.

Pong

Download the code, run it in your favorite IDE. Explore and learn the code, and try to improve or add more features.

Challenge: Merge single player and multi-player into a single game. After the splash screen, ask the user to pick what they want to do -- Play against a computer or a friend!


394 views0 comments

Recent Posts

See All

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating

Subscribe

Subscribe to our mailing list for regular updates on news, events, insightful blogs, and free code!

Thanks for subscribing!

bottom of page