-
Notifications
You must be signed in to change notification settings - Fork 20
OnStuck location sharing for NavArea avoidance #1598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
OnStuck location sharing for NavArea avoidance #1598
Conversation
|
One way to test this behavior is to cherry pick the bot following PR #1345, on a branch that doesn't have the NavArea jump eligibility fix #1558, and loading up ntre_oilstain_ctg along with applying the following console script: The above script enables bot commanding, increases the time limit, and forces the bots to choose assault class. Then at the part of the map where there was a problematic jump clearance issue with the truck trailer, commanding the bots to go to the other side of the trailer leads to them getting stuck: bot-nav-avoid-onstuck-navareas-start-training-1.mp4After a few iterations of commanding the bots to cross over to the other side of the trailer, eventually the bots choose paths that avoid common sticking points: bot-nav-avoid-onstuck-navareas-after-training-2.mp4The area avoidance penalties can be disabled at any point to revert to the original pathing behavior for comparison: bot-nav-avoid-onstuck-navareas-after-training-disable-penalty-3.mp4 |
124b9cd to
ef6060f
Compare
ef6060f to
4228d58
Compare
|
Clicked the rebase branch in the GitHub web UI, so this rebased build should have the bot commands feature. One can test bots getting stuck awkward locations in maps by using the following commands: Then one can press use on the paused teammate bots to get them to follow you, and then use the ping button to have bots walk between different areas that might be suspicious. One example area to try this kind of testing is the Rabbit-Frog spawn near the large crane/lifter model. Because the NavMesh generation didn't properly implement nav_crouch annotations at the crane/lifter base, the bots can get stuck running into the crane base: bot-nav-avoid-onstuck-navareas-saitama-crane.mp4(In the above test, one side already had OnStuck penalties, while the other side did not, as at this part of the clip I had already executed a few move commands) |
|
Intentionally NOT rebasing on top of #1601, in order to make this easier to test. This proposal I expect to be a bit more controversial since it's both a cheat and a bandaid on top of awkward NavMeshes, so open to feedback on whether this is even an approach we want to consider at this point. |
| CUtlMap<int, ReservationInfo> m_Reservations[MAX_TEAMS]; | ||
| CUtlMap<EHANDLE, BotReservedAreas_t> m_BotReservedAreas; | ||
| CUtlMap<int, int> m_AreaPathCounts[MAX_TEAMS]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this PR, but pointing out that we might wanna use TEAM__TOTAL (4) instead of MAX_TEAMS (32) for the map sizes.
Description
When bots are in the OnStuck behavior, bots record where they got stuck and which adjacent NavArea node they were going to in the path reservation system, so that other bots can avoid those trouble areas. This is intended to help smooth out bot behaviors in maps where the navmesh generation has not been cleaned up.
Toolchain