"VisionBallGame is a real-time interactive game using Python, OpenCV, and MediaPipe. Players use their hands to catch moving enemies on the screen. The game tracks hand movements via webcam and updates the score when an enemy is caught, providing an engaging experience through advanced hand-tracking and computer vision technologies."
- Features
- Usage
- Code Overview
- Concepts Used
- Challenges Faced
- Images and Videos
- Future Enhancements
- License
- Real-time hand tracking using a webcam
- Interactive gameplay with score tracking
- Dynamic enemy movement
- Easy-to-use interface
1.Run the game:
Open a terminal or command prompt, navigate to the project directory, and execute:
2.Gameplay Instructions:
-
Objective: Use your index finger to catch the moving enemies on the screen.
-
Scoring: The score increases each time an enemy is caught.
-
Exit the Game: Press 'q' to quit the game at any time.
3.Controls:
-
Hand Movement: Move your hand in front of the webcam to control the game.
-
Enemy Interaction: Position your index finger close to the moving enemy to score points.
-
Troubleshooting:
4.Webcam Issues:
-
Ensure your webcam is properly connected.
-
Performance: Close other applications if you experience lag.
-
Detection Accuracy: Ensure good lighting for accurate hand tracking.
-OpenCV: For video capture and image processing.
-MediaPipe: For hand tracking and landmark detection.
-NumPy: For mathematical operations.
-Video Capture: Captures video from the webcam.
-Hand Detection: Detects and tracks hand landmarks using MediaPipe.
-Enemy Movement: Randomly positions the enemy on the screen.
-Collision Detection: Checks for proximity between the player's finger and enemy to update the score.
-Continuously captures and processes video frames.
-Updates score when the player's finger touches an enemy.
-Moves enemies to new positions when caught.
-Computer Vision: Real-time processing with OpenCV.
-Hand Tracking: MediaPipe for detecting hand landmarks.
-Game Mechanics: Score tracking and interaction through gesture recognition
-Real-time Processing: Optimizing performance for smooth gameplay.
-Lighting Conditions: Ensuring accurate tracking in different lighting environments.
-Coordinate Mapping: Mapping hand positions to screen coordinates accurately.
Images
"Displays real-time hand recognition with detected hand landmarks and a blue circle indicating tracked positions in the webcam feed."
"Displays real-time hand recognition with a blue circle on the index finger and another blue circle representing the enemy target in the webcam feed."
Videos
VN20240808_193153.mp4
G-Drive Link
https://drive.google.com/file/d/1z71S2z2AnT5i7tsJWebQKhzyeNONLhoL/view?usp=sharing
-Add more levels with increasing difficulty.
-Include additional gestures for diverse interactions.
-Enhance UI design and add sound effects for better user experience.