Sockets are currently available with Windows and Mac support only. Linux coming soon.
You can use https://github.com/RLBot/RLBot/tree/master/src/main/cpp/RLBotInterface/src as a reference implementation in c++.
Unless otherwise specified, data is sent and received on the socket in this format:
- First two bytes are an integer (big-endian) which specifies the data type (see list below).
- Next two bytes are an integer (big endian) which specifies the number of bytes in the payload.
- Remaining bytes are a payload. The logic for parsing it will depend on the data type, but generally it will be binary data in flatbuffer format. Using tools provided by Google (i.e. flatc.exe) and rlbot.fbs you can auto-generate code in various languages suitable for writing / parsing the payload data.
Types expected to flow from RLBot to the client are in bold. Some are bi-directional.
- Game tick packet (arrives at a high rate according to /Tick-Rate except "desired tick rate" is not relevant here)
- Field info (sent once when a match starts, or when you first connect)
- Match settings (sent once when a match starts, or when you first connect)
- Player input
- Actor mapping data (deprecated, related to Remote RLBot)
- Computer id (deprecated, related to Remote RLBot)
- Desired game state
- Render group
- Quick chat
- Ball prediction (sent every time the ball diverges from the previous prediction, or when the previous prediction no longer gives a full 6 seconds into the future).
- Ready Message (clients must send this after connecting to the socket)
- Message Packet: List of messages, having one of the following types:
- PlayerStatEvent - Event when a player performs an action or earns an accolade recognized in statistics, e.g. BicycleHit, HatTrick, MostBoostPickups.
- PlayerSpectate - Spectator camera is now focusing on a new player.
- PlayerInputChange - Human or bot has touched their controller, e.g. turned on boost, changed steering, etc.
Prerequisites (handled automatically by RLBotGUI / the RLBot framework):
- Rocket League must be running under the
RLBot.exe must be running. After it successfully connects to Rocket League, it will start listening on TCP port 23234.
As a client, connect to TCP port 23234. Note: please expect to receive the port as a parameter in the future rather than hard coding
- Send a 'ready' message, as defined here. Be sure to use the data format explained above (two bytes for data type, two bytes for size...)
Some attributes in the ready message are not used yet. Once you're connected, you will start receiving data on the socket, with one of the data types specified above.
Send data to the same TCP socket, using the same format (two bytes for type, two bytes for size). You can send match settings (starts a new match), player input, desired game state, render group, and quick chat.
Consult google.github.io/flatbuffers to learn how to construct the byte array for your payload in the language of your choice.
- Allow clients to connect on a different port and exchange data in json format instead of flatbuffers.