Welcome to the Pong Game! This is a classic Pong game implementation using Pygame with both Single-Player and Multiplayer modes. Challenge yourself with AI or compete against a friend!
pip install -r requirements.txtPlay against an AI paddle with a lives system. Reach a score of 3 to win!
Features:
- Lives System: Start with 3 lives. Lose one when the ball goes out of bounds.
- Score System: Reach 3 points to win the game.
- Time Limit: Complete your objective within 10 seconds.
- Difficulty: Ball speed increases as you hit it.
- HUD Display: Real-time display of Score, Lives, and Time remaining.
Controls:
LEFT ARROWorAkey: Move paddle leftRIGHT ARROWorDkey: Move paddle right
Win/Lose Conditions:
- Win: Reach a score of 3 before time runs out
- Lose: Lose all 3 lives OR time runs out
Play with another player in a classic two-player Pong format.
Controls:
- Player 1:
Wto move up,Sto move down - Player 2:
UP ARROWto move up,DOWN ARROWto move down
- Background Music: Ambient space music during gameplay
- Score Tracking: Real-time score display for all game modes
- Game Timer: Time-based gameplay to add urgency
- Welcome Screen: Intuitive start screen
- Game Over Screens: Clear feedback for wins, losses, and ties
- Smooth Gameplay: 60 FPS game loop for fluid motion
python single_player.pypython main.pypython main.py # (if configured as default launcher)The project is organized into two main game implementations:
- Single-player vs AI paddle mode
- Lives-based gameplay (3 lives per game)
- 10-second time challenge
- Score-based winning condition (reach 3 points)
- Progressive difficulty (ball speed increases)
Key Modules:
welcome_screen()- Shows game introductiongame_loop()- Main single-player game loopplayer_wins()- Victory screengame_over()- Defeat screenreset_game()- Resets all game variables
- Two-player competitive mode
- Vertical paddle controls
- Parallel opponent handling
- Score tracking for both players
assets/images/- Game backgrounds and graphicsassets/music/- Background music (space-120280.mp3)
- Screen Resolution: 800x600 pixels
- Frame Rate: 60 FPS
- Ball Radius: 15 pixels
- Paddle Dimensions: 140px × 20px (single-player), 20px × 100px (multiplayer)
- Game Duration: 10 seconds (single-player)
- Lives: 3 (single-player)
- Win Score: 3 points (single-player)
Single-Player Mode:
- Keep your paddle centered for better reaction time
- The ball speeds up as you hit it—build momentum carefully
- Watch the timer in the top-right corner
- Try to reach 3 points before time expires
Multiplayer Mode:
- Position your paddle to intercept the ball early
- Use smooth, controlled movements
- Anticipate ball bounces off walls
- Difficulty Levels: Easy, Medium, Hard modes
- Power-ups: Score multipliers, slow-motion balls
- Leaderboard: Track high scores
- Customization: Adjustable paddle size, ball speed, colors
- Sound Effects: Ball collision sounds and victory/defeat audio
- Mobile Support: Touch controls for mobile devices
- Pause Feature: Ability to pause mid-game
pong-game/
├── main.py # Multiplayer game entry point
├── single_player.py # Single-player game (with lives system)
├── requirements.txt # Python dependencies
├── README.md # This file
├── LICENSE # MIT License
└── assets/
├── images/ # Game backgrounds
└── music/ # Background music files
See requirements.txt for dependencies:
- pygame >= 2.1.0
- Python >= 3.8
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by: Halip26
Last Updated: April 2026
Enjoy the game! Feel free to fork and customize it for your own purposes. Enjoy the game!
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by Halip26