A fun and interactive 2D game that uses real-time hand tracking to control a helicopter using just the tip of your index finger! Navigate through obstacles and score as high as you can. The game gets more challenging as your score increases.
- 👆 Real-time finger tracking using Mediapipe
- 🧠 Motion control using the index finger tip
- 🧱 Avoid dynamically placed obstacles
- 🚀 Speed increases as your score increases
- 🌆 Background changes to building scene as difficulty increases
- 💾 High score is saved in a local
score_file - 📷 Built with OpenCV and Python
- Python
- OpenCV – for image processing and camera input
- Mediapipe – for real-time hand and finger detection
- NumPy – for efficient computation
- Clone
git clone https://github.com/cvframeiq/Gesture_Game.git
- Change directory
cd Gesture_Game - Create virtual environment
python3 -m venv .venv
- Activate the virtual environment
source .venv/bin/activate - Install requirements
pip install -r requirements.txt
- Run the script
python3 main.py
..
├── LICENSE
├── README.md
├── Untitled.mp4
├── file_structure.txt
├── main.py
├── requirements.txt
├── score_
└── utils
├── __pycache__
│ └── image_processor.cpython-312.pyc
├── background.jpg
└── image_processor.py
3 directories, 10 files
- The webcam captures real-time video.
- Mediapipe tracks the index finger tip.
- The helicopter follows the Y-position of the finger.
- The player avoids obstacles that move horizontally across the screen.
- As score increases:
- The speed of obstacles increases.
- The background changes to add difficulty.
GNP GPL V3 License. Feel free to use, modify, and distribute this project.