Giter VIP home page Giter VIP logo

automate-google-dino's Introduction

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

automate-google-dino's People

Contributors

ragavendranmrn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.