Giter Club home page Giter Club logo

steer_the_air's Introduction

STEER THE AIR

Ever seen a MAGICIAN swinging his finger in the air and making the objects to fly around??? Well, I don't know the trick behind it, I am so sorry for that :( , but what best I can do for you is, I can give you a power alike that. Here is a small and simple game for you where you control the speed and the direction of the car by just using the tip of your index finger. See it live here : https://hemant27031999.github.io/STEER_the_AIR/

How it works?

I used the TENSORFLOW MEDIAPIPE HANDPOSE model to detect the hand position in the live video. This model gives you a set of 21 points corresponding to your fingers and thumb. The game lags a little bit because some time is required to detect the hand and find out the points. Once detected, I simply calculate the distance and the direction of the tip of index finger vector with respect to centre and make the car to move according to that vector.

About the game

The game is built using p5.js (for making the objects to move around), html (drawing canvas and other layouts) and the tensorflow handpose model (for finding out the hand's position). You have to drive the car using the tip of your index finger, by constantly eating the food present in the ground and saving yourself from the enemies. The energy of the enemies and your car itself decreses at a constant rate over the time. To increase it, you have to eat the food to boost up your strength and your enemies will feed on you for their power. There is a rotating saw blade in the ground with sharp edges, so if anyone come in contact with it, it will get destroyed. The enemy object does not have any intelligence, they just simply follow random path and may collide with the rotating blade. However, they are intelligent enough to see you and chase you from a distance. Use your wits to make them collide with the blade and earn points. The more you eat and the more enemies get killed, the more points you get. However, if you collide with a enemy, your health as well as your score both decreases. Try not to include more than one hand, that can confuse the model as to which hand to be followed. It will be better if the bakground is simple and plain, that will help to easily detect the hand. If you remove your hand from the video, the last determined position of the hand will be used for the reference.

Contributing

The game is presently very simple and there is enough scope of improvement. We can add different types of food, obstackles and enemies. Just send a PR if you want to contribute.

steer_the_air's People

Contributors

hemant27031999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

steer_the_air's Issues

The game doesn't fit.

The video from the camera is too big and because of that the game does not get on the screen.
Browsers: Firefox 76, Chrome 81

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.