Hi Sarb,
Currently, there are two official bot APIs for Robocode Tank Royale:
Java platform: https://github.com/robocode-dev/tank-royale/tree/main/bot-api/java.Net platform:
https://github.com/robocode-dev/tank-royale/tree/main/bot-api/dotnetAnd at some point I will introduce an API for web as well.
If you want to build an API from scratch, you could choose to:
1) Create an API very similar to the current APIs that are made very similar on purpose. Meaning that your Python API would have same classes and methods, but in Python style of course.
2) Create your own version and just use communicate with the server in a more "raw" fashion by communicating over a WebSocket.
If you choose option 2, you need to send and receive messages using the
protocol described here:
https://github.com/robocode-dev/tank-royale/blob/main/schema/schemas/game/README.mdAnd the
schemas (message formats) are available here (In
JsonSchema format)
https://github.com/robocode-dev/tank-royale/tree/main/schema/schemas/gameIf you choose option 1, you should create something similar to
BaseBot as a first step (like I did), which handles the basic communication between a bot and the server.
Later you can create a
Bot with more advanced methods as step 2.
Also note that you could use the existing APIs as is. For example, we have
Jython, which is a Python implementation for the existing
Java Bot API.
And you could use
Python.Net for with the existing
.Net Bot API.
I you want to do a real Python API that are similar to the existing one, I will be happy to assist you. 👍
I guess most code from the existing platforms can be translated without a big hassle for Python. I did the same for Java to .Net, and I will do it again later for the coming web API. 😊
Best regards,
- Flemming