Skip to content

This is python based game controller, which can play mouse and click using color objects.

Notifications You must be signed in to change notification settings

manpreet2000/game-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

game-controller

This is python based game controller, which can play mouse and click using color objects.
Documentation Status PRs Welcome

output

How does that work?

  • Idea is to find colour for two objects, one for moving mouse another for clicking it.
  • Calculate external countours of both colored objects and use them to trigger mouse activity.
  • simple enough!!
File Info
main.py To choose color
game.py Game python file

What color and how to choose it?

  • So main.py is the file where you can place object in front of you and choose color parameters according to you!
  • After calculating color values of both colored objects, use the value in game.py.

well, where to use value in game.py?

  • In game.py, you will get
lower_pink = np.array([139, 65, 121])
upper_pink = np.array([164, 88, 176])

lower_yellow = np.array([16, 101, 146])
upper_yellow = np.array([179, 255, 255])
  • Change these values with your color values.
  • So important thing is i have used yellow color to control the mouse and pink to fire clicks.
  • Change your yellow and pink accordingly.

About

This is python based game controller, which can play mouse and click using color objects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages