A simple retro-style Ping Pong game built with Pygame. It features paddle movement, AI opponent behavior, sound effects, and a game over screen.
- Classic Paddle Gameplay : Move the paddle up and down to hit the ball.
- AI Opponent : The enemy paddle follows the ball dynamically.
- Retro Aesthetic : Includes a pixel-art background, retro colors, and a pause overlay.
- Sound Effects : Hits, edge bounces, and game-over sounds.
- Game Over & Restart : Displays a Game Over screen and allows a quick restart.
- Ensure you have Python and Pygame installed:
pip install pygame
- Clone this repository:
git clone https://github.com/XanderSteyn/Ping-Pong.git cd Ping-Pong
- Run the game:
python PingPong.py
Key | Action |
---|---|
UP / DOWN |
Move player paddle |
P |
Pause/Resume |
R |
Restart (on Game Over) |
ESC |
Quit (on Game Over) |
- The ball moves in a straight line and bounces off walls.
- When it collides with a paddle, it reverses direction with a slight random angle change.
- The AI paddle follows the ball's Y position with slight delay.
- If the ball passes the left edge, the game ends.
- The player can restart by pressing
R
- Sound Effects : Located in
SFX/
- Sprites : Background and ball image in
Sprites/
- Fonts : Uses system Arial