Skip to content

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ Pong Game - Python & Pygame

A classic Pong game built using Python and Pygame where the player competes against an AI-controlled opponent.
The game includes score tracking, collision mechanics, win conditions, and restart functionality.


๐ŸŽฎ Features

  • Classic Pong gameplay
  • AI-controlled opponent
  • Smooth paddle movement
  • Ball collision physics
  • Real-time score display
  • First-to-5 winning system
  • Game Over and Victory screen
  • Restart option using SPACE key
  • Clean and simple UI

๐Ÿ–ฅ๏ธ Controls

Key Action
W Move paddle up
S Move paddle down
โ†‘ Arrow Move paddle up
โ†“ Arrow Move paddle down
SPACE Restart game after match ends
Close Window Exit the game

๐Ÿง  Game Logic

  • The player controls the left paddle.
  • The AI opponent automatically follows the ball.
  • The ball bounces off:
    • Top wall
    • Bottom wall
    • Both paddles
  • Missing the ball gives the opponent a point.
  • The game ends when either player reaches 5 points.
  • Pressing SPACE resets the game and starts a new match.

๐Ÿ“ Project Structure

pong-game/ โ”‚ โ”œโ”€โ”€ pong.py # Main game source code โ”œโ”€โ”€ README.md # Project documentation โ”œโ”€โ”€ .gitignore # Ignored files for Git โ”œโ”€โ”€ LICENSE # MIT License


๐Ÿš€ Future Improvements

Some features that can be added in the future:

๐Ÿ”Š Sound effects and background music ๐ŸŽจ Better graphics and animations ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ Multiplayer mode ๐Ÿ“ˆ Increasing difficulty levels โšก Ball speed progression ๐Ÿ† Main menu and pause screen ๐ŸŽฏ Smarter AI opponent ๐ŸŒˆ Visual particle effects


๐Ÿ› ๏ธ Technologies Used Python Pygame


๐Ÿ“œ License

This project is licensed under the MIT License.


๐Ÿ‘จโ€๐Ÿ’ป Author

Simran Sajid

Built with Python and Pygame.

About

A classic Pong game built with Python and Pygame featuring AI opponent, score tracking, win conditions, and restart functionality.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages