-
Tower Building
-
Hill Climb Racing
-
Dino Game
- Play Dino Game Online (Simply search "Dino Game" in Google for offline play or play directly in your browser when disconnected from the internet!)
-
Pong Classic
- This game is built in the project code using OpenCV. Itโs a classic Pong game where you control paddles with hand gestures.
- Hand Gesture Recognition using OpenCV and MediaPipe.
- Key Simulation through custom key press libraries.
- Interactive GUI to select and play different games.
/my-project
โ
โโโ .idea/ # IDE configuration files (used by JetBrains IDEs like PyCharm)
โโโ Resources/ # Folder containing all background images and game-related assets
โ โโโ Background.png # Background image used in the GUI
โ โโโ gameOver.png # Game over screen image
โโโ __pycache__/ # Automatically generated folder by Python containing compiled bytecode files
โโโ img_re/ # Folder for storing image-related resources
โ โโโ dino.png # Example image for the Dino game
โ โโโ pong_ball.png # Example image for the Pong game
โโโ .gitattributes # Git configuration file for line endings and attributes
โโโ GUI.py # Python script for the Graphical User Interface (GUI)
โโโ README.md # Project documentation
โโโ directkeys1.py # Python script for simulating key presses for Game 1
โโโ directkeys2.py # Python script for simulating key presses for Game 2
โโโ directkeys3.py # Python script for simulating key presses for Game 3
โโโ game1.png # Image file (PNG format) used for displaying the button for Game 1
โโโ game2.png # Image file (PNG format) used for displaying the button for Game 2
โโโ game3.png # Image file (PNG format) used for displaying the button for Game 3
โโโ game4.png # Image file (PNG format) used for displaying the button for Game 4
โโโ hand_landmarks.png # Image file (PNG format) used for visualizing hand landmarks
โโโ main.py # Python script that runs the game control system
โโโ requirements.txt # File listing all the dependencies for the project
-
Run the Game GUI:
- To start the game, run
main.py
first. This will launch the GUI where you can select the game.
python main.py
- To start the game, run
-
Select a Game:
- You will see the four game options in the GUI:
- Tower Building
- Hill Climb Racing
- Dino Game
- Pong Classic
- You will see the four game options in the GUI:
-
Control the Game:
- Hand gestures will control the game.
- Use gestures to simulate pressing keys like "Space" for jumping, "Enter" for selecting, or "Left/Right arrows for movement, depending on the game selected.
-
Libraries:
- Install the required libraries by running:
pip install -r requirements.txt
- Install the required libraries by running:
-
Game Control:
- The games are controlled using hand gestures detected through OpenCV and MediaPipe.
This project demonstrates how to build a hand-gesture-controlled gaming system using OpenCV and MediaPipe. By using this directory structure and the accompanying Python scripts, you can easily manage the assets, game logic, and interface for an interactive game.