Documentation about the Chrome Dino Runner AI written in Visual Basic .Net and C#
...................GERMAN/GERMAN...................
In the following documentation I show the process for the automated gameplay of the Chrome Dino Runner game. The following were used:
-http://www.trex-game.skipser.com/ ........clone of the game
-Visual Basic .Net & C#.................................The project was implemented in both programming languages . The performance of both languages is the same
-Implementation:
The same algorithm was used in both languages. There is no interaction with the website other than sending the Space and Down keys. To detect an obstacle, the program reads the pixel color of the yellow marked spot in the image below:
If the color has the value "[A=255, R=83, G=83, B=83]", which corresponds to the color of the cacti, an obstacle is detected. Since the XY coordinates marked in yellow vary depending on the monitor size, the function of the current project can be excluded without editing. In order to be able to use the project properly, not only the coordinates of the obstacles, but also a pixel coordinate of the location marked in the image below must be edited in the code.
These are used to recognize “Game Over”. In other words: When the game ends because the AI made a mistake, the program recognizes that the game is over and starts a new attempt.
This video shows a walkthrough of the C# version
The C# code is described in detail.
...................ENGLISH/ENGLISH...................
In the following documentation we show you the process of the automated gameplay of the Chrome Dino Runner game. We used:
-http://www.trex-game.skipser.com/ ........ clone of the game
-Visual Basic .Net & C# ................................... The project was written in both programming languages .
-Implementation:
Both languages are using the same algorithm. There are no interactions with the website to detect the obstacles. To detect an obstacle, the program reads the color of the yellow marked pixel:
If the color has the value "[A=255, R=83, G=83, B=83]", which is the color of the cactus, an obstacle is detected. Since the yellow XY coordinates vary depending on the monitor size, the function of the current project must be excluded without editing. In order to be able to use the project without error, the coordinates of the obstacles and a pixel coordinate in the marked area, which can be seen below, must be edited in the code.
These are used to recognize the "Game Overs". So, when the game is over, the program detects the end and starts a new attempt.
This video shows a passage of the C# version
The C# code is described in detail.