[RG] Initial bot implementation with configs #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Video demonstration: https://www.loom.com/share/408d1d185704492ca24fc4206445a6e6?sid=5c105e98-c980-4e9f-80b7-ef7c55047b38
Hey Spatial team! We finished up the initial bot discussed last week, and it’s working great! As you’ll see in the video, the bot is configured to move randomly during a random interval of time, keep a minimum distance from other players/bots, miss the ball with a certain probability, and target the nearest player with a certain probability. All of these configs are adjustable via a config pane in the editor.
The only roadblock we encountered here was that the logic for which player to target existed in the BallControl.cs file, rather than the Bot.cs file. Ideally, all bot logic would exist in the bot file, but if the ball and bot are not owned by the same client, it was unclear how to have a bot alert or tell the ball which player to target. Is there a “messaging” system that allows synced objects to communicate? TLDR; the original code treats the ball almost as its own character that decides who to target, but it may be beneficial to have the bots decide that for themselves? If not, we can leave it as is and have target selection not be part of the bot logic.