Install all of the pakages bellow by using pip or pip3
The idea came up with the mosquito terminator game on pysource.com 😉
This is the Computer Vision Game developed by myself.
The game consists of zombies and angels flying in the center of the screen. Every time you swat a zombie you get 1 point and every time you swat an angel you lose 1 point. In case you swat multiple zombies, you will get multiple points; the same applies to swatting angels. Everything must be done within a certain number of seconds. This is the image of the Game.'
Video game demo on Youtube
The game integrated tracking of the movements of the body with OpenCV. For the tracking of the hand gesture, which will be the joypad of our game, I used MediaPipe.
MediaPipe is a library deveploped by google ready to use and for multiple functions, for my project, just a few commands are enough and we manage to have 21 points of the hand. If you want more details on hand tracking I suggest you read the official MediaPipe Hands guide
Clone the project and install all the needed packages, to run the game following command line:
$ python main.py
Depend on your purpose and idea, the game can be developed some features in the future, there are some of my recommendations 💁♂️:
- Two players at one time
- Create more levels with correspond screen
- Set a target score for each level if the player could not reach the score the game have to reset to the first level
- ...etc...
Hope you have a wonderful time with my project, enjoy it and don't forget to follow me and drop stars 🌟 on my repo in github 😊