DEV Community

Cover image for Cheat The Chrome Dino Game In Just 2 Minutes
Asif
Asif

Posted on

Cheat The Chrome Dino Game In Just 2 Minutes

If you are using chrome or chrome based other browsers, you must be familiar with the In-built dinosaur game in the browser. It comes whenever you are offline and trying to browse to the internet.

Dino game preview

So, have you ever wondered to achieve the ultimate score of 99999 and see what happens. Technically, Its not impossible if you are super patient and have all day to play. But today, we'll do the impossible just by some tweaking and modifying the code.

The game only starts when you are disconnected to the internet or offline. But you don't have to be offline to play the game. Simply search :

chrome://dino
Enter fullscreen mode Exit fullscreen mode

And the game will appear !

CHEAT !

After some researching the code and the modules. Here's some useful things that I found :

  • The T-rex is defined as Runner Object.
  • All the game logics are in the Runner.prototype object.

Dino Logic

The game overs whenever the dino hits something

Immortality

Open inspect go to the console tab to implement the code below.

So, first of all we have to disable the gameOver function whenever the Dino hits something. In order to that, we have to re-define the function into an empty function :

Runner.prototype.gameOver = function(){} // Press Enter after
Enter fullscreen mode Exit fullscreen mode

GameOver Cheat !

disabling `gameOver` function

BOOM ! Now the game won't stop and you will get unlimited scores !

Why Wait Hours To Get To 99999 Point?

The "T-rex"'s speed is encoded in the Runner.instance_ object.

Runner.instance_.setSpeed(100) // set the speed to 100
Enter fullscreen mode Exit fullscreen mode

Dino SPEED !

You can also set the jump height :

Runner.instance_.tRex.setJumpVelocity(5)
Enter fullscreen mode Exit fullscreen mode

Enjoy and show off with you friends (Β¬β€ΏΒ¬)

🎢🎢 The End 🎢🎢

Oldest comments (1)

Collapse
 
darshkul24 profile image
Darsh

Bravo
What a hack..
Its Super Duper Cool..☺☺