Use pose estimation to play the game subway-surfers
A Demo video shows how to play this game.🖼️
Basically, I can play this game by controling my hand's movements.
- Left hand go left -> the character moves to the left ⬅️
- right hand go right -> the character moves to the right ➡️
- left&right hand go up -> the character jumps ⬆️
- left&right hand go down -> the character crouchs ⬇️
- python == 3.10.0 (64-bit)
- opencv-python == 4.8.0.76
- PyAutoGUI == 0.9.54
- mediapipe == 0.10.5
- Create a Virtual Environment:
python -m venv your_virtual_env_name # For Windows
# or
python3 -m venv your_virtual_env_name # For Linux
- Activate the Virtual Environment:
source your_virtual_env_name/bin/activate # For Linux/macOS
# or
.\your_virtual_env_name\Scripts\activate # For Windows
- Install Dependencies from requirements.txt:
pip install -r requirements.txt
-
Now, select the virtualenv kernel and Run the all the shell line by line which are present in Playing-Subway-Surfere-Game-using-pose-detection.ipynb
-
In that, you need to start the game using this link Game-link and than you need to run second last shell in Playing-Subway-Surfere-Game-using-pose-detection.ipynb
- follow the Demo video and play this game.
All the game is how works this all details are avilable in this python code Playing-Subway-Surfere-Game-using-pose-detection.ipynb
The code is very simple, self-explained and easy to understand. You are free to customize it and create a new way to paly the subway-surfers.