/MachineLearningGame-ZombieKiller

The fundamental Computer Vision and Machine Learning Game that uses the Mediapipe library to track the hand gestures of the player.

Primary LanguagePythonMIT LicenseMIT

MachineLearningGame-ZombieKiller 🧟 Creator: Hieu (Toni)

Python packages needed for the Game project

Install all of the pakages bellow by using pip or pip3

[Python] [Pygame Library] [OpenCV CV2 Library] [Mediapine] [Numpy] [License] [Message]

The innovation

The idea came up with the mosquito terminator game on pysource.com πŸ˜‰

Introduction

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.'

image

Game demo

Video game demo on Youtube
Screenshot 2023-09-13 091258


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
hand-landmarks
mqlrf-s6x16

How to run the game

Clone the project and install all the needed packages, to run the game following command line:
$ python main.py

Future work

Depend on your purpose and idea, the game can be developed some features in the future, there are some of my recommendations πŸ’β€β™‚οΈ:

  1. Two players at one time
  2. Create more levels with correspond screen
  3. Set a target score for each level if the player could not reach the score the game have to reset to the first level
  4. ...etc...

Summury

Hope you have a wonderful time with my project, enjoy it and don't forget to follow and drop me a star🌟 on my repo in github 😊