Skip to content

An extended version of the classic Pong game using vanilla JavaScript and HTML5 Canvas. Includes dynamic ball speed control, collectible items, extra ball generation, and real-time player movement.

Notifications You must be signed in to change notification settings

Anas-Shanan/Pong-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Pong Plus

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.

๐Ÿ“ Project Structure

/
โ”œโ”€โ”€ 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

๐Ÿ› ๏ธ How to Run

  1. Clone or download the repository.
  2. Open pong.html directly 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.

๐ŸŽฎ How to Play

  • 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.

๐Ÿ“ข Notes

  • Pure JavaScript project โ€” no libraries or frameworks.
  • Designed for learning, fun, and practice.
  • Ball directions have randomized angles for more dynamic gameplay.

๐Ÿ“ License

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.

About

An extended version of the classic Pong game using vanilla JavaScript and HTML5 Canvas. Includes dynamic ball speed control, collectible items, extra ball generation, and real-time player movement.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published