An extended version of the classic Pong game using vanilla JavaScript and HTML5 Canvas.
Includes ball speed control, collectible items with bonus points, and an extra ball when players reach certain scores.
/
โโโ ball.js # Ball behavior: movement, collision, scoring
โโโ items.js # Bonus items randomly appearing on the field
โโโ keyboard.js # Player movement handling with Arrow and WASD keys
โโโ pong.html # Game HTML file
โโโ pong.js # Game loop, rendering, game logic
โโโ assets/ # (Optional) Images or sounds if you add later
- Clone or download the repository.
- Open
pong.htmldirectly in your web browser.
git clone https://github.com/your-username/pong-plus.git
cd pong-plus
# Open pong.htmlโ No server needed โ pure frontend project.
- Player 1 (right side): Control with Arrow Up and Arrow Down.
- Player 2 (left side): Control with W and S keys.
- Grow Score: Collect random bonus items that appear on the field.
- Ball Speed Control: Adjust the ball's speed using the slider on the page.
- Extra Ball: An additional ball appears automatically after reaching a score of 4.
- Pure JavaScript project โ no libraries or frameworks.
- Designed for learning, fun, and practice.
- Ball directions have randomized angles for more dynamic gameplay.
This project is for educational and personal practice purposes.
Feel free to fork it, customize it, and expand it!
Built with โค๏ธ to extend a classic game into a dynamic new experience.