Paperspace / DinoRunTutorial

Accompanying code for Paperspace tutorial "Build an AI to play Dino Run"
https://blog.paperspace.com/dino-run
MIT License
323 stars 104 forks source link

Doubt on javascript code -- usage of `Runner` #8

Closed Shekharrajak closed 5 years ago

Shekharrajak commented 5 years ago

Thanks for this article. I didn’t understand how did you know Runner is for checking the state like current score, gamer running or not, crashed or not, resume, start, …

Is that present in every canvas game? Mean did it work only for chrome://dino ? How can I find out Runner kind of variable to check the game state in other websites?

ravi72munde commented 5 years ago

It is specific to this game. I went through the source code of the game to know that Runner object can be used to get these state variables. It will be different for different games, some might not even have any accessible mechanism.