A ready to use template of a C++ Rocket League bot using RLBotCPP and RLUtilities.
- RLBotGUI
- CMake 3.8 and higher
- Compiler with c++17 support
- GCC 8.1 and higher (9.1 if using mingw)
- Visual Studio 2017 and higher
- Clang 7 and higher (not tested)
-
Clone this repository by running:
git clone https://github.com/Darxeal/RLUtilitiesCPPExampleBot.git --recursive -
Open RLBotGUI, add the cloned folder (Add -> Load Folder) and start a match with the example bot(s).
- Navigate to the folder and run
cmake -A x64 -B build . - Go to the generated
buildfolder and open the.slnfile with Visual Studio. - Confirm that Build->Build Solution works.
- Right click on RLUtilitiesCPPExampleBot in the solution explorer and choose 'Set as StartUp Project'
- Choose Debug->Start Debugging (or F5), or press the green play button in Visual Studio.
- Install the CMake Tools extension.
- Run the
CMake: Debugcommand (or press Ctrl+F5) to start debugging - To build in release mode, run
CMake: Select Variantand selectRelease. Then you can runCMake: Build.
- CLion detects CMakeLists.txt and add a Debug configuration automatically.
- Press F5 to debug or Ctrl+F5 to run.
- To add a Release configuration, go to Settings -> Build, Execution, Deployment -> CMake and add a new profile with Build type set to Release.
The rlbot framework has the ability to launch the bot executable automatically. This is useful when sharing your bot and usually required when you enter a tournament.
In order to get auto-starting to work you will need to do the following things.
- Build your bot executable (in Release mode!).
- Find your bot executable in CMake build output (usually
build/Release) and copy it to therlbotfolder. - Set the
cpp_executable_pathfield inrlbot/CppPythonAgent.cfgso it points to the bot executable.