https://github.com/virxec/rlbot-python-example
Example of a Python bot using the RLBot v5 framework
https://github.com/virxec/rlbot-python-example
python rlbot
Last synced: 2 months ago
JSON representation
Example of a Python bot using the RLBot v5 framework
- Host: GitHub
- URL: https://github.com/virxec/rlbot-python-example
- Owner: VirxEC
- License: mit
- Created: 2024-07-22T20:03:43.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-03-08T22:25:16.000Z (2 months ago)
- Last Synced: 2025-03-08T23:21:11.276Z (2 months ago)
- Topics: python, rlbot
- Language: Python
- Homepage: https://rlbot.org/v5
- Size: 58.6 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RLBotPythonExample
Example of a Python bot using the RLBot framework
Wiki: [VirxEC/python-interface/wiki](https://github.com/VirxEC/python-interface/wiki)
## Quick Start
1. Install Python 3.11 or later
1. Create a Python virtual environment
- `python3 -m venv venv`
1. Activate the virtual environment
- Windows: `.\venv\Scripts\activate`
- Linux: `source venv/bin/activate`
1. Install the required packages
- `pip install -r requirements.txt`
1. Download `RLBotServer.exe` and place it in the root directory
-
1. Modify `rlbot.toml` to your liking
- Note: `dev.toml` also exists with a few changed settings that might be useful for development
1. Start a match with `python run.py`## Changing the bot
- Bot behavior is controlled by `src/bot.py`
- Bot appearance is controlled by `src/loadout.toml`## Configuring for the v5 botpack
1. `pip install pyinstaller`
1. `pyinstaller --onefile src/bot.py --paths src` -
This will create a file called `bot.spec`.
1. Create `bob.toml` in the same directory as the spec file with the following content:
```toml
[[config]]
project_name = "PythonExample"
bot_configs = ["src/bot.toml"][config.builder_config]
builder_type = "pyinstaller"
entry_file = "bot.spec"
```- `project_name` will be the name of your bot's folder in the botpack
- `bot_configs` is a list of bot configs that will be included in the botpack
- `builder_type` should always be `pyinstaller`
- `entry_file` is the name of the spec file1. Commit both `bot.spec` and `bob.toml` to your bot's repository.
Note that `bob.toml` CANNOT be renamed, but `bot.spec` can be anything as long as `entry_file` is also renamed to reflect the change.