rlbot

crates.io docs pipeline status

[RLBot] is a framework for creating offline Rocket League bots. This crate exposes Rust bindings to RLBot's [RLBotCoreInterface.dll]. It presents a simple, safe interface that should feel comfortable to Rust developers.

Usage

```rust let rlbot = rlbot::init()?; rlbot.startmatch(rlbot::MatchSettings::simple1v1("Hero", "Villian"))?;

let mut packets = rlbot.packeteer();

// Wait for the match to start. packets.next() sleeps until the next // packet is available, so this loop will not roast your CPU :) while !packets.next()?.GameInfo.RoundActive {}

loop { let packet = packets.next()?; let input: rlbot::PlayerInput = Default::default(); rlbot.updateplayerinput(input, 0)?; } ```

Quick start

This repo comes with a simple example to get you started. It's called atba, which stands for Always Towards Ball Agent. To try it out, open Rocket League, and then run the example like so:

sh git clone https://gitlab.com/whatisaphone/rlbot-rust cd rlbot cargo run --example atba

If you get an error, chances are you need to download the framework! Proceed to the next section.

Installing the framework

RLBot is needed to use this RLBot binding, of course. If the framework is not found in any of Windows's [DLL search locations], init() will return this error:

text Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }

You'll need to download [these files] from RLBot:

Place them in a directory in your $PATH. Alternatively, if you don't want to pollute your system, place them in your crate's target directory, e.g. target/debug or target/release).