Flappy Plane is a gesture-controlled game where players navigate a plane through buildings using hand movements captured via a webcam. The game utilizes OpenCV, MediaPipe, and Pygame for real-time hand tracking and gameplay.
- Hand Gesture Control: Move the plane up and down using your hand.
- Realistic Buildings: Dynamically drawn skyscrapers with windows and shadows.
- Obstacle Avoidance: Navigate through gaps in buildings.
- Score Tracking: Earn points for successfully passing buildings.
- Crash Effects: Sound and explosion animation on collision.
Ensure you have Python installed, then run:
pip install opencv-python mediapipe pygame
python Game.py
- Move Up/Down: Raise or lower your hand in front of the webcam.
- Quit Game: Press
Esc
orQ
in the camera window. - Restart Game: Click "Restart Game" on the pop-up after crashing.
- Python 3.8+
- OpenCV
- MediaPipe
- Pygame
- Tkinter (for restart popup)
- Camera captures hand movements.
- MediaPipe detects the hand's position.
- The plane moves up/down based on hand height.
- Buildings scroll from right to left.
- Avoid hitting buildings and keep flying!
Pull requests are welcome! Feel free to improve the code or add new features.
Happy Flying!