DEV Community

Cover image for What happens when you reach the max score in chrome dino game? šŸ¤”
KrisztiƔn Maurer
KrisztiƔn Maurer

Posted on ā€¢ Edited on

16 5

What happens when you reach the max score in chrome dino game? šŸ¤”

You are probably familiar with the chrome dino game, and you have probably asked what happens at the end of the game. I will answer it for you.

What is the max score in the chrome dino game?

The answer is 999999

How did I find out?

I override the gameOver function so when the game calls it noting happens and set the speed to a high value

Runner.instance_.gameOver = ()=>{}
Runner.instance_.currentSpeed = 100000
Enter fullscreen mode Exit fullscreen mode

console

Maurer KrisztiƔn max score cut

When you reach the 999999, sadly the counter restarts, nothing happened. šŸ˜”

You can try this at chrome://dino/

Top comments (3)

Collapse
 
jarvisscript profile image
Chris Jarvis ā€¢ ā€¢ Edited

It's cool that you figured that out. I guess the other option would have been to freeze the score at 999,999.

Collapse
 
maurerkrisztian profile image
KrisztiĆ”n Maurer ā€¢ ā€¢ Edited

Thanks! Here you go:
Image description

Runner.instance_.distanceRan = 39999960
Runner.instance_.currentSpeed = 0
Enter fullscreen mode Exit fullscreen mode

and you can set the high score

Runner.instance_.distanceMeter.setHighScore(39999960)
Enter fullscreen mode Exit fullscreen mode

if you set distanceRan = 999 999 its not tha same.. so I calculated the ratio aprox 40*999999 = 39999960 this is working..

Collapse
 
kimdontdoit profile image
kimdontdoit ā€¢

Nice and clever test! Sounds like my car when it reached 300k (counter stuck at 299 999km) lol

What gave you the idea?

šŸ‘‹ Kindness is contagious

Please leave a ā¤ļø or a friendly comment on this post if you found it helpful!

Okay