๐ Ping Pong Game ๐ฎ
Welcome to the ultimate Ping Pong game built in Java! Get ready for fast-paced, addictive gameplay with smooth controls and exciting sound effects! ๐
๐ About the Game
This classic Ping Pong game brings the retro arcade feel straight to your desktop!
Control your racket ๐, bounce the ball ๐พ, and compete against a friend or the CPU ๐ค.
The game speeds up as you play, making every rally more thrilling! โก
โจ Features
๐น๏ธ Smooth & responsive controls โ Player 1 uses
W
/S
, Player 2 usesโฌ๏ธ
/โฌ๏ธ
.๐ค CPU Mode โ Press
C
to challenge a smart AI opponent for solo matches.โก Dynamic ball speed โ The ball accelerates with each paddle hit, pushing your reflexes to the limit!
๐ Retro sound effects โ Classic bounce and score sounds bring that nostalgic arcade feeling.
๐ Neon arcade-style UI โ Glowing center line, paddle-displayed scores, and a vibrant, retro look.
๐ Game Over & Restart โ First to 5 points wins! Press
R
to restart anytime.
๐ฎ How to Play
Launch the game by running
Main.java
Press ENTER to start from the menu
Use your controls to move your racket up and down
Bounce the ball past your opponentโs racket to score!
First player to reach 5 points wins the match ๐
Press R to restart after the game ends
Toggle CPU mode anytime by pressing C
๐ How it Works
The Ball class manages position, movement, and speed increase.
The Racket class handles player or CPU paddle movement and scoring.
The main game loop uses a
Timer
for smooth animations and updates.Key listeners track continuous paddle movement for fluid control.
Sound playback is threaded to prevent lag and keep gameplay buttery smooth.
๐ License
This project is open-source and free to use. Enjoy! ๐
Made with โค๏ธ by andredisa