Rocket League Bot Notes
The maths and Python behind a hard-coded Rocket League bot: vectors, steering, path planning and aerial motion.
I wrote the bot with Daniel McMurray on the RLBot framework. The repository is an early prototype, and some examples in these notes explore designs that are not yet implemented in it. Code here is for the RLBot v4 Python API (the rlbot 1.x package); the v5 pre-release has a different API.
The pages
- Project overview: what the framework provides, how the bot is structured and what it does today.
- Game state, coordinates and units: the tick loop, the world’s handedness, converting a world position into the car’s own frame, and units.
- 3D vector system: the
Vec3class, distances, angles, and the waysacosfails. - Steering and driving: turning an angle into a steering input, and why a proportional controller can circle a target forever.
- Ground kinematics: how the car accelerates, brakes, coasts and boosts, and how far and how fast it gets.
- Path optimisation analysis: turning radius against speed, arc-then-line paths and time-to-target.
- Aligning shots on target: hitting the ball is easy; hitting it towards the goal needs an offset approach point.
- Aerial kinematics: solving for the orientation and boost needed to reach a point in the air at a given time.
- Behaviours and testing: behavioural states, debug rendering and repeatable tests.
Distances are in Unreal Units (uu, where 1 uu = 1 cm) and speeds in uu/s, because that is what the game reports. The constants come from community measurements, not from Psyonix, and each page says where. Rocket League is a game by Psyonix, and this site isn’t affiliated with it.