https://github.com/prasukj7-arch/catching_circles
An interactive game that uses OpenCV and Mediapipe for real-time hand tracking to control a paddle in a ball-catching game. The game is built with Pygame, where players move their hand to catch falling balls and score points. The challenge increases as the ball speed grows with the score.
https://github.com/prasukj7-arch/catching_circles
augmented-reality game-development hand-gesture-recognition mediapipe opencv pygame python
Last synced: 2 months ago
JSON representation
An interactive game that uses OpenCV and Mediapipe for real-time hand tracking to control a paddle in a ball-catching game. The game is built with Pygame, where players move their hand to catch falling balls and score points. The challenge increases as the ball speed grows with the score.
- Host: GitHub
- URL: https://github.com/prasukj7-arch/catching_circles
- Owner: Prasukj7-arch
- Created: 2025-02-02T15:06:16.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-02-08T14:52:28.000Z (8 months ago)
- Last Synced: 2025-04-06T23:41:20.234Z (6 months ago)
- Topics: augmented-reality, game-development, hand-gesture-recognition, mediapipe, opencv, pygame, python
- Language: Python
- Homepage:
- Size: 771 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🎮 Ball Dropping and Catching Game (Computer Vision + Pygame)
This is a **fun and interactive ball-catching game** that uses **Computer Vision (OpenCV & Mediapipe)** to track hand movements and control a paddle in **Pygame**. The objective is to **catch the falling balls** before they hit the ground. Each time you catch a ball, a new one appears, and its speed increases, making the game progressively more challenging! 🚀
---
## 📌 Features
✅ **Hand-tracking-based Paddle Movement** using OpenCV & Mediapipe
✅ **Dynamic Ball Speed** – The ball falls faster as your score increases
✅ **New Ball Appears After Each Catch** – Only one ball at a time per horizontal lane
✅ **Game Over if a Ball is Missed**
✅ **"Play Again" Option** (Press `SPACE` to restart, `Q` to quit)---
## 🛠 Installation
### **1️⃣ Clone this repository**
```bash
git clone https://github.com/YourGitHubUsername/Ball-Dropping-Game.git
```
### **2️⃣ Navigate to the project folder**
```bash
cd Ball-Dropping-Game
```
### **3️⃣ Install Dependencies**
```bash
pip install opencv-python mediapipe pygame
```
### **4️⃣ Run the Game**
```bash
python ball_game.py
```## 🎮 How to Play
1️⃣ **Move your hand in front of the camera** 📷 to control the paddle.
2️⃣ **Catch the falling ball** with the paddle.
3️⃣ **Each time you catch a ball, a new one appears, and its speed increases.**
4️⃣ **If you miss a ball, the game ends.**
5️⃣ **Press `SPACE` to play again or `Q` to quit.**---
## 📷 Hand Tracking Setup
The game uses **Mediapipe's Hand Tracking** to detect your hand position and move the paddle accordingly.### **Hand Movement Controls**
- 🖐 **Move your hand left or right** → Paddle moves left or right
- ⚡ **No need for keyboard/mouse!**---
## 🖼 Game Screenshot
Below is a screenshot of the game in action:

---
## 🚀 Future Enhancements
- 🎵 Add sound effects for catching and missing balls
- 🔥 Implement multiple difficulty levels (Easy, Medium, Hard)
- 🏆 Add a High Score system---
## 📜 License
This project is open-source and free to use under the **MIT License**.---
## 💡 Credits
👨💻 **Created by:** Your Name
🎮 **Inspired by:** AI-based gaming and Computer Vision---
⭐ **If you like this project, feel free to give it a star!** ⭐