Skip to content

RLBot/RLBotCSharpExample

Repository files navigation

RLBotCSharpExample

Example of a Rocket League bot implemented in C#

Usage Instructions

Prerequisites

Make sure you've installed Python 3.7 64 bit or newer. During installation:

  • Select "Add Python to PATH"
  • Make sure pip is included in the installation

Using Visual Studio

  1. Install Visual Studio 2015 or newer. It should come with .NET Framework 4.6.1 or newer.
  2. Open RLBotCSharpExample\RLBotCSharpExample.sln in Visual Studio.
  3. In Visual Studio, click the "Start" button,
  4. Double click on run-gui.bat.
  5. Click the "Run" button. Rocket League should open automatically!

Using Rider

  1. Install Rider. If you do not have Visual Studio installed alongside Rider, follow this article to set up Rider.
  2. Open RLBotCSharpExample\RLBotCSharpExample.sln in Rider.
  3. In Rider, click the "Run Default" button, which should compile and run the bot. Leave it running.
    • The first time you click it, you may be given a dialog to set up the configuration. Click the "Run" button in the dialog to continue.
  4. Double click on run-gui.bat.
  5. Click the "Run" button. Rocket League should open automatically!

Upgrades

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!

Upgrading in Visual Studio

  1. In Visual Studio, right click on the RLBotCSharpExample C# project and choose "Manage NuGet Packages..."
  2. Click on the "Installed" tab. You should see a package called "RLBot.Framework".
  3. If an upgrade is available, it should say so and give you the option to upgrade.

Upgrading in Rider

  1. In Rider, right click on the RLBotCSharpExample C# project and choose "Manage NuGet Packages".
  2. In the "Installed Packages" section, click on the package called "RLBot.Framework".
  3. If the "Version" dropdown contains a higher version than what your project currently has, you can select that version and click the Upgrade button next to the dropdown to upgrade.

Notes

  • Bot behavior is controlled by RLBotCSharpExample/RLBotCSharpExample/ExampleBot.cs
  • Bot appearance is controlled by CSharpPythonAgent/appearance.cfg
  • See the wiki for tips to improve your programming experience.
  • If you'd like to keep up with bot strategies and bot tournaments, join our Discord server. It's the heart of the RLBot community!

Overview of how the C# bot interacts with Python

The C# bot executable is a server that listens for Python clients. When 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 RLBot_Core_Interface DLL.

About

Example of a Rocket League bot implemented in C#

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors