Game Link : http://www.trex-game.skipser.com/
This is a automatic player game. The python code controls the dinosaur (player).
Works using python's image processing library.
Cross-platform GUI automation for human beings.
PyAutoGUI is a Python module for programmatically controlling the mouse and keyboard.
Python Imaging Library (abbreviated as PIL) (in newer versions known as Pillow) is a free library for the Python programming language that adds support for opening, manipulating, and saving many different image file formats.
1.The code converts a region ahead of the dinosaur into grayscale to check the presence of any obstacle.
2.If obstacle appears the code controlls the dinosaur by pressing the respective keys to avoid the obstacles.
3.The image coordinates vary depending on the screens resolution.
4.Set the coordinates accordingly for perfect obstacle detection.