Skip to content

This is a virtual game controller which i have built-in python using OpenCV. This uses a ball to control the character in our game.

Notifications You must be signed in to change notification settings

harshkumarkhatri/Game-Controller-OpenCV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Game Controller

This is a game controller which i made in openCV and python.
This acts as a simulator for your games and lets you play your game with the help of a ball which is identified from the camera of your laptop. Once the ball is identified a circle will be drawn around the ball with a center of the ball in colour.
A box is also drawn in dark green colour, sides of which acts as the directions for our game. When you take the ball and pass it beyond the sides, it will trigger the particular keystore and the character, in my case car, will be turning in that particular direction.
You can play games like Subway surfer, temple run, any car game being controlled by A, W, S, D keys.
I have tested the contoller in online games and it game almost good results.
The inputs to the game are given with the help of a python library, pynput.
Things used in this project:-

  • Python
  • OpenCV
  • Pynput
  • imutils

Some snaps from the project

  • Full video

About

This is a virtual game controller which i have built-in python using OpenCV. This uses a ball to control the character in our game.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages