Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.43 KB

README.md

File metadata and controls

37 lines (29 loc) · 1.43 KB

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.