Example of a Rocket League bot implemented in C#
- Make sure you've installed Python 3.6 64 bit. During installation:
- Select "Add Python to PATH"
- Make sure pip is included in the installation
- Install Visual Studio 2015 or newer. It should come with .NET Framework 4.6.1 or newer.
- Open RLBotCSharpExample\RLBotCSharpExample.sln in Visual Studio.
- In Visual Studio, click the "Start" button, which should compile and run the bot. Leave it running.
- Open Rocket League
- Double click on run-gui.bat
- Click the 'Run' button
- Bot behavior is controlled by
- Bot appearance is controlled by
When submitting to a tournament, you will need to include several files.
Some can be found under RLBotCSharpExample/RLBotCSharpExample/bin after you compile in Visual Studio:
You should also include the entire CSharpPythonAgent folder. This folder also contains a port.cfg file. Make sure their contents are identical!
This project uses a package manager called NuGet to keep track of the RLBot framework. The framework will get updates periodically, and you'll probably want them, especially if you want to make sure your bot will work right in the next tournament! To upgrade:
- Open the project in Visual Studio.
- Right click on the RLBotCSharpExample C# project, and choose "Manage NuGet Packages..."
- Click on the "Installed" tab. You should see a package called "RLBot.Framework".
- If an update is available, it should say so and give you the option to upgrade.
Overview of how the C# bot interacts with Python
The C# bot executable is a server that listens for Python clients.
CSharpPythonAgent/CSharpPythonAgent.py is started by the RLBot framework, it connects to the C# bot server and tells it its info.
Then the C# bot server controls the bot through the