#rocket-league #physics #physics-simulation #rlbot

rl_ball_sym

rl_ball_sym is a Rust implementation of Rocket League's ball physics

44 releases (stable)

4.1.1 Jun 14, 2024
3.1.3 Jul 25, 2023
3.0.0 Mar 2, 2023
2.5.2 Dec 20, 2022
0.2.0 Jul 6, 2021

#6 in Simulation

Download history 415/week @ 2024-03-02 39/week @ 2024-03-09 10/week @ 2024-03-30 160/week @ 2024-05-04 26/week @ 2024-05-11 6/week @ 2024-05-18 10/week @ 2024-05-25 7/week @ 2024-06-01 146/week @ 2024-06-08 92/week @ 2024-06-15

255 downloads per month

MIT license

540KB
2.5K SLoC

rl_ball_sym

unsafe forbidden

forthebadge

Rust implementation of Rocket League's ball physics; Inspired by Samuel P. Mish's C++ utils called RLUtilities with accuracy improvements from RocketSim and other miscellaneous performance improvements.

Running

Make sure you have Rust/Cargo installed, then just run cargo test --release in the terminal.

Example implementations

Check out the examples folder! If you want to run them and don't know how:

cargo run --example example_name

For example, to run the example basic.rs:

cargo run --example basic

Performance numbers

Numbers are from a system running Ubuntu 23.10 with a Ryzen 9 5900X and 3600MHz CL18 RAM.

Numbers will vary depending on your system. Only default features are enabled.

  • load_standard: Loads 8028 triangles, executes in around 650µs
  • load_hoops: Loads 15732 triangles, executes in around 1.30ms
  • load_dropshot: Loads 3616 triangles, executes in around 300µs
  • load_standard_throwback: Loads 9272 triangles, executes in around 810µs
  • get_ball_prediction_struct_for_time: standard + 8 seconds, executes in around 200µs
  • get_ball_prediction: standard + 6 seconds, executes in around 150µs
  • get_ball_prediction: Hoops + 6 seconds, executes in around 160µs
  • get_ball_prediction: Dropshot + 6 seconds, executes in around 140µs
  • get_ball_prediction: standard + Throwback Stadium + 6 seconds, executes in around 155µs

Features

  • standard: Enable loading the standard map
  • hoops: Enable loading the hoops map
  • dropshot: Enable loading the dropshot map
  • throwback: Enable loading the throwback map (with standard game rules)
  • compression: Minimize the size of the produced binaries by compressing the binary field data at compile time. Will slightly slow down load_x() functions.

Dependencies

~3–5MB
~102K SLoC