Skip to content

Input and Output Data

Tyler edited this page Aug 25, 2018 · 2 revisions

Input and output data are controlled by this specification: https://github.com/RLBot/RLBot/blob/master/src/main/flatbuffers/rlbot.fbs

Based on that file, classes are auto-generated in the rlbot.flat namespace, e.g. rlbot.flat.GameTickPacket.

Game Tick Packet

GameTickPacket is a class that holds most information about the game like car and ball positions, the game clock, etc. In the Java example, we have chosen to translate the GameTickPacket into our own DataPacket object because:

  • It is generally wise in software engineering to translate to your own business objects. If the framework changes the data format, you will only need to alter your code in one place (the translation), and your complicated bot logic can stay the same.
  • The classes in the rlbot.flat namespace are not particularly useful. They have no functions and their read access is a bit slow because the data is stored in a way that you might not expect.

We have not done a complete job of giving DataPacket 100% of the available data. Modify the files in https://github.com/RLBot/RLBotJavaExample/tree/master/src/main/java/rlbotexample/input if you find that you need more of what GameTickPacket offers. You can look at https://github.com/RLBot/RLBot/blob/master/src/main/flatbuffers/rlbot.fbs or use your IDE to see what's available.

Boost Data

Java has a convenience class called BoostManager that helps you get the combined location and status information for boost pads (location and status data come from separate sources). https://github.com/RLBot/RLBotJavaExample/blob/master/src/main/java/rlbotexample/boost/BoostManager.java

Feel free to modify this file if you want, it's just there to get you started and not part of the framework.

Dropshot Data

See the central wiki here: https://github.com/RLBot/RLBot/wiki/Dropshot