A therapeutic game designed to aid in hand rehabilitation through gesture-controlled gameplay. This project combines computer vision with the classic Flappy Bird game to create an engaging rehabilitation tool.
- Hand Gesture Control: Play the game using hand gestures (open/close fist)
- Patient Management: Track individual patient progress and high scores
- Time Management: Limit playtime to 20 minutes per day to prevent overuse
- Data Analysis: Comprehensive statistics and progress tracking
- User-Friendly Interface: Simple and intuitive controls
- Database Integration: Secure storage of patient data and game statistics
- Python 3.8+
- MySQL Server
- Webcam
- pip (Python package manager)
-
Clone the repository
git clone https://github.com/yourusername/HandGesture-contolled-flappybird.git cd HandGesture-contolled-flappybird -
Create a virtual environment (recommended)
python -m venv venv .\venv\Scripts\activate # On Windows source venv/bin/activate # On macOS/Linux
-
Install dependencies
pip install -r requirements.txt
-
Set up the database
- Create a MySQL database
- Update the database configuration in
db_operations.py - Run the database schema setup (if provided)
-
Start the game
python game.py
-
Controls
- Make a fist to make the bird fly up
- Release your fist to let the bird fall
- Press ESC to exit the game
- After game over, make a fist to play again (if time remains)
-
View Statistics
python analyze_game_data.py
- View top high scores
- Check player statistics
- Analyze session data
- View daily statistics
The analyze_game_data.py script provides detailed analytics:
- Top High Scores: View the highest scores across all patients
- Player Statistics: Detailed stats for individual players
- Session Analysis: In-depth analysis of game sessions
- Daily Statistics: Summary of daily gameplay metrics
game.py: Main game logic and hand gesture detectiondb_operations.py: Database connection and operationsanalyze_game_data.py: Data analysis and reportingpatient_form.py: Patient registration and managementhandopenclose.py: Hand gesture recognition modulerequirements.txt: Project dependencies
The application uses the following tables:
patients: Stores patient information and high scoresgame_sessions: Records each game session with scores and timestamps
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions or support, please contact:
- WhatsApp: +91 9032682005
- GitHub: @nihith303
- Play the Game: https://nihith303.github.io/rehab-wings-website-version/
- GitHub Repo: https://github.com/nihith303/rehab-wings-website-version
- Special thanks to all contributors and testers
- Inspired by the original Flappy Bird game
- Built with Python, Pygame, and OpenCV