How to make Automatic Dino Game?

 Interesting?

          Hey folks, in this post we are going to do a very interesting thing. We are going to automate the Google chrome Dino game using PYTHON.
                          

Exited?

How to do?

Step 1 : Download and install Python3

                 After that, for automation process we need two python packages:
                      ❤ pyautogui
.                      ❤ PIL

Step 2 : Write the following command to install these two packages:
 
pip3 install pyautogui
pip3 install pillow

Wait, What are we going to do here?
 
1.  We need to capture the screenshot of the chrome dino game      screen on greyscale.

2.  Then we want to add some kind of rectangle on this image for    cactus so that when i get those pixels of  the rectangle near to dino then we can make jump dino.

3.  The same goes for birds.

4.  That's it,  after this, we will see our chrome dino game is automated using python.


CODE.....CODE.....CODE.....

                   1. Import required modules.....
      

2. Function for checking collision....


3. Create main function.....

4.( Optional) Draw rectangle for cactus and birds...


And We Done!😍
                                                
                                                                    Give it a try!
                                              Help Dino break the records!
 
                        

Comments

Popular posts from this blog

Intellect Interview Experience

Google

Accolite digital Interview experience