Skip to content

๐Ÿ€๐Ÿ“ฆ๐ŸŽฎ Interactive Gesture-Controlled Game with Computer Vision ๐Ÿ–๏ธ๐Ÿ’ป A Python project combining OpenCV, MediaPipe, Pygame, and Pymunk to create a physics simulation ๐Ÿช where the player can grab, move, and rotate virtual boxes ๐Ÿ“ฆโœจ using only their hands in front of the camera ๐Ÿ“ท๐Ÿ™Œ.

Notifications You must be signed in to change notification settings

alu0101540153/BasketBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

BasketBox

(university project)

BasketBox Logo

BasketBox is an interactive AI-powered basketball box simulation using Python, Pygame, Pymunk, OpenCV, and MediaPipe. Control virtual boxes with your hand gestures detected by your webcam!


Features

  • Real-time hand tracking and gesture recognition
  • Physics-based box movement
  • Interactive basketball court background
  • Splash screen before starting
  • Easy-to-use controls

Requirements

  • Python version: 3.11.x (recommended)
  • Operating System: Windows (tested), compatible with other OS with minor changes

Python Packages

  • pygame
  • pymunk
  • mediapipe
  • opencv-python

Image Example


Installation

  1. Clone the repository:

    git clone <repo-url>
    cd BasketBox
  2. (Optional) Create a virtual environment:

    python -m venv venv
    venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt

    If you don't have a requirements.txt, install manually:

    pip install pygame pymunk mediapipe opencv-python
  4. Add images: Place the following images in the images/ folder:

    • logoWhite.png (logo)
    • splash.png (splash screen)
    • caja.png (box)
    • basketball.png, cesped.png (optional backgrounds)

How to Run

  1. From the project root, run:

    python -m src.BasketBox.main

    Or, if you have a main script:

    python juego.py
  2. Controls:

    • Press SPACE to start from splash screen
    • Use your hand to interact with boxes (make a fist to grab)
    • Press ESC or close window to exit

Project Structure

BasketBox/
โ”‚   README.md
โ”‚   requirements.txt
โ”‚   pyproject.toml
โ”‚   setup.cfg
โ”‚
โ”œโ”€โ”€ images/
โ”‚     logoWhite.png
โ”‚     splash.png
โ”‚     caja.png
โ”‚     cancha.png
โ”‚     basketball.png
โ”‚     cesped.png
โ”‚
โ””โ”€โ”€ src/
      BasketBox/
         __init__.py
         main.py
         ...

Professional Notes

  • Code is modular and commented in English
  • Uses constants for hand connections for clarity
  • Splash screen and logo for professional look
  • All dependencies listed for reproducibility
  • Compatible with Python 3.11.x

Author

Developed by Vรญctor Rodrรญguez Dorta


Enjoy BasketBox! ๐Ÿ€

About

๐Ÿ€๐Ÿ“ฆ๐ŸŽฎ Interactive Gesture-Controlled Game with Computer Vision ๐Ÿ–๏ธ๐Ÿ’ป A Python project combining OpenCV, MediaPipe, Pygame, and Pymunk to create a physics simulation ๐Ÿช where the player can grab, move, and rotate virtual boxes ๐Ÿ“ฆโœจ using only their hands in front of the camera ๐Ÿ“ท๐Ÿ™Œ.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages