Skip to content

This interactive game leverages fundamental web technologies to simulate a classic Ping Pong match against a sophisticated AI opponent. It features collision detection algorithms, event-driven user input handling for paddle control, and utilizes audio elements for enhanced gameplay feedback.

Notifications You must be signed in to change notification settings

shamikaredkar/Ping-Pong-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gameplay Demo

Ping Pong Game

Welcome to the Ping Pong Game! This project is a simple yet engaging game built with HTML5 Canvas and JavaScript, allowing players to enjoy a classic game of ping pong right from their web browsers.

Features

  • Realistic gameplay: Simulates a real ping pong game with responsive paddles controlled by keyboard input.
  • Sound effects: Includes sounds for the ball hitting a paddle, scoring a point, and hitting the game walls.
  • Score tracking: Keeps track of the player's and AI's scores, displaying them on the canvas.
  • Dynamic AI opponent: The AI paddle moves based on the ball's position, providing a challenging gameplay experience.

How to Play

  • Start the game: Open the game.html file in a web browser to start the game.
  • Player control:
    • Use the Up Arrow key to move the paddle up.
    • Use the Down Arrow key to move the paddle down.
  • Winning the game: The game continues until either the player or the AI scores 20 points. An alert will be shown for the winner, and the game window will close.

Technologies Used

  • HTML5
  • CSS3
  • JavaScript
    • Canvas for drawing the game elements.
    • Event listeners for paddle control.

Setup

To run this project locally:

  1. Clone or download the project to your local machine.
  2. Open the game.html file in a browser to start playing.

About

This interactive game leverages fundamental web technologies to simulate a classic Ping Pong match against a sophisticated AI opponent. It features collision detection algorithms, event-driven user input handling for paddle control, and utilizes audio elements for enhanced gameplay feedback.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published