Skip to content

Sockets specification

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++.

Data Format

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.

Data Types

Types expected to flow from RLBot to the client are in bold. Some are bi-directional.

  1. Game tick packet (arrives at a high rate according to /Tick-Rate except "desired tick rate" is not relevant here)
  2. Field info (sent once when a match starts, or when you first connect)
  3. Match settings (sent once when a match starts, or when you first connect)
  4. Player input
  5. Actor mapping data (deprecated, related to Remote RLBot)
  6. Computer id (deprecated, related to Remote RLBot)
  7. Desired game state
  8. Render group
  9. Quick chat
  10. 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).
  11. Ready Message (clients must send this after connecting to the socket)
  12. 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.

Connecting

Prerequisites (handled automatically by RLBotGUI / the RLBot framework):

  • Rocket League must be running under the -rlbot flag.
  • 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.

Sending Data

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.

Future plans

  • Allow clients to connect on a different port and exchange data in json format instead of flatbuffers.

Client Libraries

Python

Who's Using Sockets