GithubHelp home page GithubHelp logo

trex-dino-game-py3's Introduction

trex-dino-game-py3

Dino game bot using python3.x -- no AI


Juptyper Lab
Jupter Get Started

My Setup
Windows 8.1 x64
Python 3.7
pip3

pip3 install jupyterlab


Windows .bat for easy launching

Add to Jupyter folder start_jupyter.bat

Then type jupyter lab


In your project folder add these folders

-> images
-------> boxes
-------> dino

Most of the code should be self explantory. Here are some the may need explaining

textScore -- Image capture box to read the speed up cyccles
textGameOver -- Turns off the bot if the game is over, otherwise the spacebar is continually pressed
dinoBox -- Image capture box around dino, it is move automatically to the right for obsticles
dinoTail -- Image capture box to check if the jump failed or not and reset to jump

xOffset -- Pre looking distance to right right checking for obsticles
xIncrement -- Adds more distance to right with ever 100 point speed up cycle

Second to last code area is for setting up image capture boxes. Make sure f_stopMe() is on if doing so.

#f_displayDino()
# f_checkScore(True)
# f_checkBox(True)
#f_checkGameOver(True)
# f_checkTail(True)
#
# f_stopMe()

The last box is the main running while loop.

First time do >> to run the all the code blocks

Note - My cpu may faster or slower than yours so the xOffset and xIncrement may need tweaking. I tried to have the dino land just after the obsticles to begin with

Lastly this if for fun only so let's not take away human high score slots.


2k Score -- Perhaps could be better by adding crouch

Screen Capture

trex-dino-game-py3's People

Contributors

c006 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.