Preparing your bot on start
Before you can go through this example you need to first setup your environment. You can find out how to do that in our Getting started guide .
When the game is initialized your bot often needs to do some resource intensive things with the map, load external files used for machine learning or something else.
For that use case we have made it possible that the first time the update(...)
method of your bot is called, it has 15 seconds to respond.
Code
In the example below we show a simple way to detect the first game update so that you can run your setup logic.
⚠️ To keep the example clean we didn’t include the whole code for the bot. In order to use this code you need to paste it to an appropriate location in your bot implementation.
|
|
|
|
|
|
Next up
Now you are ready to go on your own! If you need some help with ideas of what to implement next you can check our Strategy ideas page. You can also check our API reference to see all the data your bot receives during the game.
Next: Strategy ideas