How to hack the Chrome dinosaur game

A screenshot of the Chrome Dinosaur game
(Image credit: Future)

Wondering why you'd want to learn how to hack the Chrome dinosaur game? Well, if you've been getting frustrated at your lack of progress, you might want to hack this simple but challenging game to change its parameters and make it a little easier and fun.

If you're not familiar with the Chrome Dinosaur game, simply put, it was Google's way of allowing Chrome users to have a little fun while suffering an internet outage. Now, though, it can be played whenever, and makes for a great little break if you're a little bored at work or home, or if you're lacking stuff to do on your lunch break.

The gameplay is pretty straightforward. Make sure the T-Rex doesn't hit obstacles by getting it to jump over or crouch under them. The longer your run is, the higher your points. It's a tried and trusted recipe.

So how can a game like this be hacked? Surely Google don't want users hacking their software? Well, it seems like the tech giant aren't fussed about you increasing your fun a little more by altering the page's code. You can alter the game in all kinds of ways, including making your dinosaur invincible, or change how they run and jump.

Without further ado, here's how to hack the Chrome dinosaur game. First, though, if you don't already know, we'd better show you how to play the Chrome dinosaur game.

How to hack the Chrome dinosaur game: Playing the game 

Although you could wait until you go offline to play Chrome's secret dinosaur game, you can play it in your browser right now without needing to lose your internet connection. Here's how to play the Chrome dinosaur game.

1. Type chrome:dino into Chrome’s address bar and press Enter. This will display a graphic of a dinosaur with the instruction “Press space to play.”

Press the Spacebar on your keyboard to begin the secret dinosaur game.

(Image credit: Google)

2. Gameplay couldn’t be simpler. As the dinosaur runs across the desert landscape, keep pressing the Spacebar or the up arrow key on your keyboard to jump over the cacti. When you hit one, it’s game over. 

The game gets steadily faster and places larger and more frequent cacti in your way.

(Image credit: Google)

3. Once you reach 500 points, there’s another obstacle to avoid in the form of pterodactyls flying towards you. 

Avoid contact with these by jumping over them or by pressing the down arrow key to duck

(Image credit: Google)

4. The dinosaur game switches to dark mode (white graphics on a black background) when you pass 700 points, then back to standard mode at 900 points. 

This happens again at 1,400 points and every further multiple of 700. 

(Image credit: Google)

5. To pause the game, press the Alt key on your keyboard. You can also press F11 to pause gameplay and switch to full-screen. Click your screen to resume the game.  

How to hack the Chrome dinosaur game: Change jump height and speed 

Want to make the Chrome dinosaur jump higher or lower? Or make the T-Rex start running at a faster speed rather than gradually pick up the pace? Then try these two hacks below. 

1. With the Chrome dinosaur game loaded in your browser, right-click the web page and choose Inspect to open the “Developer tools” panel

Alternatively, press Ctrl+Shift+I on your keyboard, or click the Chrome menu button and choose “More tools,” then “Developer tools.”

(Image credit: Google)

2. Click the Console tab at the top of the “Developer tools” panel. To adjust the jump height of the dinosaur, type or copy and paste the following code into the Console text box and press Enter. 

Runner.instance_.tRex.setJumpVelocity(15)

You can change the “(15)” part to a higher or lower number to increase or decrease the T-Rex’s jump height.

(Image credit: Google)

3. To adjust the dinosaur’s running speed, type or copy and paste the following code into the Console text box and press Enter. 

Runner.instance_.setSpeed(1000)

Again, you can change the “(1000)” to a different numerical value for a faster or slower pace.

(Image credit: Google)

4. Close the “Developer tools” window and press the Spacebar to start a new game. You should notice the change in jump velocity and running speed. 

You'll also see a new "Start slower" slider at the bottom of the screen that lets you control the starting speed.

(Image credit: Google)

How to hack the Chrome secret dinosaur game: Make the dinosaur invincible

If you’re tired of cacti and pterodactyls bringing your game to an early end, you can use a cheat to make you invincible to those obstacles and keep your dinosaur running forever. That may remove the challenge from the game, but it means you can play for longer. Here’s how to apply the hack. 

1. As explained in the previous section, open the “Developer tools” panel, either by right-clicking the page and choosing Inspect, or by using one of the other methods.

2. Again, click the Console tab at the top of the panel. Type or copy and paste the following code into the text box and press Enter:

var original = Runner.prototype.gameOver

3. Now, type or copy and paste this code into the Console text box and press Enter:

Runner.prototype.gameOver = function (){}

The “Game over” function in the game will now be disabled, effectively granting the Chrome dinosaur invincibility.

(Image credit: Google)

4. Close the “Developer tools” panel and press Space to play a new game. 

You’ll find that the T-Rex can now run straight through cacti and pterodactyls without being killed. It can run forever, in fact, while your score reaches amazing new highs.

(Image credit: Google)

6. After a while, invincibility can get a bit tedious, so you may want to switch back to a proper game.

To do this, open the Console in the “Developer tools” panel again. Type or copy and paste the following code and press Enter:

Runner.prototype.gameOver = original

(Image credit: Google)

Start a new game and you'll find that the Chrome dinosaur can now be killed by obstacles again, just like its ancestors 65 million years ago!

(Image credit: Google)

Now you know how to hack the Chrome dinosaur game, you might want to check out our other tech hack guides. Get started by reading how to set Chrome flags to access experimental browser features and how to lock incognito tabs on Chrome mobile to keep your secret tabs extra secret. Want to learn some secret streaming hacks? You might like how to use keyboard shortcuts on Netflix and how to use secret codes on Netflix to unlock new categories. For more Chrome-related guides, take a look at how to download YouTube videos in Chrome and how to run a Safety Check in Google Chrome. We also have guides on how to block ads on Chrome, how to install Chrome extensions and how to block a website on Chrome. You can also learn how to play Android games on your PC with Google Play Games. Want to find out where the image came from? Learn how to do a reverse image search using Google. If you can't get enough of the Chrome Dino, learn how to add the Chrome dinosaur game widget to Android.

TOPICS
Robert Irvine

Robert Irvine was previously the How-To Editor at Tom's Guide. He has been writing tutorials about software, hardware, websites and other tech topics since the days of dial-up modems, and was previously the editor of Web User magazine. Robert enjoys cooking, and makes a mean sausage casserole, but is definitely not the celebrity chef of the same name.

With contributions from