Skip to content

vlsienthusiast00x/pong-game_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pong Game in Python

A classic Pong game built with Python, simulating the iconic table tennis arcade experience. Control paddles, compete against a friend or AI, and try to score points before your opponent does. This project is a fun way to practice Python skills and get hands-on with simple game development.


Features

  • Two-player mode: Challenge a friendβ€”each player controls a paddle.
  • Single-player mode: Play against computer-controlled opposition.
  • Customizable controls and easy to modify.
  • Visual score tracking and game-over display.
  • Clean and readable, well-documented Python code with the official PEP-8 formatting.

Table of Contents


Installation

  1. Clone or Download the repository:
git clone https://github.com/bytesculptor097/pong
cd pong
  1. Ensure Python 3 is installed on your system.
  2. Install dependencies:
pip install pygame

How to Play

  • Objective: Use your paddle to bounce the ball past your opponent. Score points each time your opponent misses the ball.
  • Win Condition: Reach the set score limit 5 before your opponent.
  • Controls:
  • Right Paddle: W (up), S (down)
  • Left Paddle: Up Arrow (up), Down Arrow (down)
  • The ball bounces off paddles and top/bottom walls. Missing returns a point to the opposing side.

Usage

To run the game, execute:

python pong.py

Enjoy the game window that appears! For two players, use the assigned keys to control your paddle. Score is displayed at the top.


File Structure

  • pong.py – Main game file (all logic, drawing, and event handling)
  • assets - All the pictures, sounds etc.

Requirements

  • Python 3
  • pygame
  • Cross-platform (runs on Windows, macOS, and Linux)

Video demonstration

pong_small.mp4

Contribution

Thank you for your interest in contributing to this Pong game!

Here are some ideas and wishes to improve the game:

  • Add the pause and Quit button in the middle of game.
  • Add options to customize the paddle and ball (like style colors etc.)
  • Add multiplayer support over a network.
  • Optimize performance and fix bugs.

If you'd like to help, please feel free to:

  • Fork the repository,
  • Create a new branch for your feature or fix,
  • Submit a pull request with a clear description.

Your contributions are highly appreciated!


License

This project is released under the MIT License.


About

A simple, classic, desktop Pong game πŸ“ using Python 🐍,

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages