Skip to content

tanbaycu/tennis-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎾 Tennis Game - available on device have Arrow Keys (pc, laptop,....)

tanbaycu Clone

Welcome to the Tennis Game project! This is an interactive, browser-based tennis simulation built with JavaScript and the p5.js library.

chrome-07e-Gep-Q9as.gif

🌟 Features

  • Realistic tennis court rendering
  • Player vs Computer gameplay
  • Dynamic ball physics
  • Responsive paddle controls
  • Score tracking
  • Animated characters

🎮 How to Play

  1. Use the UP and DOWN arrow keys to move your paddle.
  2. Hit the ball back and forth across the net.
  3. Score points when your opponent misses the ball.
  4. First to reach the winning score (configurable) wins the match!

🛠️ Technologies Used

  • JavaScript
  • p5.js for graphics and animation
  • HTML5 Canvas

🧠 Game Logic Highlights

  • Ball Physics: The ball's trajectory is calculated based on its velocity and the court's dimensions.
  • Collision Detection: Precise collision detection between the ball and paddles.
  • AI Opponent: The computer-controlled paddle uses simple AI to track and hit the ball.
  • Dynamic Difficulty: The game's difficulty adjusts based on the player's performance.

🎨 Visual Design

The game features a vibrant, retro-inspired design:

  • Green court with white lines
  • Animated character sprites for paddles
  • Dynamic ball shadow for depth perception
  • Stylized net with realistic shading

👏 Acknowledgements

Special thanks to the p5.js community and all the open-source contributors who make projects like this possible.

🛡️ Contact


Enjoy the game, good luck 🏆

Releases

No releases published

Packages

No packages published