Skip to content

RagavendranMRN/Automate-Google-Dino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Automating Google Dino

In this we are gonna use the http://www.trex-game.skipser.com/ automate the Dino..which is same as that of Google Dino

Required Packages

  • Pyautogui
  • Numpy
  • ImageGrab,ImageOps
  • Time

Implementation:

First we are going to click on the screen to start the Dino. Here we are having 2 conditions

  1. Initial Start of the Dino (That's starting the Game for the very first time)
  2. Restart Mode

1.Normal Mode

image

2. Restart Mode

image

Step 1: To start the Game

So the basic idea is to click at the center of the screen where the restart button is located.Using mspaint we can plot the x and y as shown below

image

Step 2: Detecting the Tree and bird

The idea is to locate the tree at some distance away from the dino. Considering the box to identify the tree and bird.

image

In this case the box (x1,y2,x2,y2) as (485,391,500,427)

Step 3: Detecting the color inside the box.

As the background different from the tree, it is easy to find the color of the tree using ImageGrab and process it using nump. And it leads to the condition when the color is different key up is triggered.

nointernet_dinogame_gif

Using this technic we can automate games such as Tap Soccers

image

Releases

No releases published

Packages

No packages published

Languages