I had automated Dino game. It detects black colour cactus and bird and the jumps and downs.
Packages you need to install : 1)pyautogui: pip install pyautogui 2)pillow: pip install pillow
Sometimes it won't work you need to change size of i and j This will change size of rectange which will make it more efficient
1)import time 2)from PIL import Image, ImageGrab:You need to install it using pip install pillow 3)import pyautogui:pip install pyautogui