Skip to content

Repository files navigation

Rehab Wings - Hand Gesture Controlled Flappy Bird

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.

Features

  • 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

Prerequisites

  • Python 3.8+
  • MySQL Server
  • Webcam
  • pip (Python package manager)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/HandGesture-contolled-flappybird.git
    cd HandGesture-contolled-flappybird
  2. Create a virtual environment (recommended)

    python -m venv venv
    .\venv\Scripts\activate  # On Windows
    source venv/bin/activate  # On macOS/Linux
  3. Install dependencies

    pip install -r requirements.txt
  4. Set up the database

    • Create a MySQL database
    • Update the database configuration in db_operations.py
    • Run the database schema setup (if provided)

How to Play

  1. Start the game

    python game.py
  2. 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)
  3. View Statistics

    python analyze_game_data.py
    • View top high scores
    • Check player statistics
    • Analyze session data
    • View daily statistics

Data Analysis

The analyze_game_data.py script provides detailed analytics:

  1. Top High Scores: View the highest scores across all patients
  2. Player Statistics: Detailed stats for individual players
  3. Session Analysis: In-depth analysis of game sessions
  4. Daily Statistics: Summary of daily gameplay metrics

Project Structure

  • game.py: Main game logic and hand gesture detection
  • db_operations.py: Database connection and operations
  • analyze_game_data.py: Data analysis and reporting
  • patient_form.py: Patient registration and management
  • handopenclose.py: Hand gesture recognition module
  • requirements.txt: Project dependencies

Database Schema

The application uses the following tables:

  • patients: Stores patient information and high scores
  • game_sessions: Records each game session with scores and timestamps

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For any questions or support, please contact:

Live Website DEMO

Acknowledgments

  • Special thanks to all contributors and testers
  • Inspired by the original Flappy Bird game
  • Built with Python, Pygame, and OpenCV

About

Extension is a deep learning–powered therapeutic game designed to aid recovery for people with nerve damage. Built around the popular Flappy Bird concept, it uses hand-gesture recognition—closing the fist makes the bird fly—to provide an engaging and rehabilitative experience. To prevent addiction, gameplay is limited to 20 minutes per day, with pe

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages