Skip to content

Rewrite managers to something more similiar to v4#13

Open
NicEastvillage wants to merge 7 commits intomasterfrom
v4oop
Open

Rewrite managers to something more similiar to v4#13
NicEastvillage wants to merge 7 commits intomasterfrom
v4oop

Conversation

@NicEastvillage
Copy link
Contributor

@NicEastvillage NicEastvillage commented Nov 16, 2025

Refactors the bot and script managers to be more similar to v4. Users instead implement an interface called IBot and its methods: GetInitialLoadout, GetOutput, OnMatchComms, and Retire - or easier yet, derive from the AbstractBot class, which has fields for all the bot parameters. The bot is managed by a BotManager (either SingleThreadBotManager, MultiThreadBotManager, or HivemindManager), which handles the lifetime of the bot and the packet communication with RLBot. Users can also easily create their own managers using the abstract class BaseAgentManager. The manager creates the bot using a factory method that is passed to it on creation. Example:

RLBotInterface rlbot = new();
SingleThreadBotManager manager = new(
    rlbot,
    "test/csharp_atba",
    botParams => new Atba(botParams)
);
manager.Run();

On major difference to v4 is that the RLBot connection is passed around as well ala dependency injection. In v4, RLBotInterface was a static class that could be called everywhere. The bot needs RLBot to do rendering, send match comms, set game state, and set loadout. We could create a facade for RLBot if we want to hide the other functionalities of the RLBot connection, but the freedom is nice, too. Let me know what you think.

@NicEastvillage NicEastvillage marked this pull request as ready for review November 21, 2025 19:06
@VirxEC
Copy link
Collaborator

VirxEC commented Feb 18, 2026

Does this PR still need more work... ?

@NicEastvillage
Copy link
Contributor Author

It's ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments