Skip to content

Conversation

@sunzenshen
Copy link
Contributor

Description

Bots when they are not going anywhere in particular will check if they are touching a teammate and then move away.

Toolchain

  • Windows MSVC VS2022

@sunzenshen
Copy link
Contributor Author

This probably needs to be combined with some sort of objective handling code, as currently the way the bot_seek_and_destroy behavior works, the bots will spread out a bit and then try to get closer to the objective again.

bot_avoid_bumping_friendlies.mp4

@sunzenshen sunzenshen added the Bots Related to bot players label Dec 11, 2025
return;

const float avoidRange = 200.0f;
const float avoidRange = 75.0f;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps this value should be lowered while we look at this erratic behavior around the objective? A standard humanoid hull is 32 hu wide, that seems like a good value, though I don't know exactly what end result you are looking for.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32 hammer units seems to work okay with normal 5v5 player numbers:

bot_avoid_bumping_friendlies_32u_spacing.mp4

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parental_Advisory_label svg

void MonitorArmedStickyBombs(CNEOBot* me);
#endif

void AvoidBumpingEnemies(CNEOBot* me);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we certain we don't want the bots to avoid bumping into enemies?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the likelihood that bots are going to be in close proximity with their enemies is relatively low. In the case where they did get into a situation where they are bumping into their enemies, I don't want to interrupt the bot's combat routine to mess with their movement keys like this function does. My speculation is that this function was more for a Left 4 Dead situation where an enemy like a Witch was passive, and you don't want your friendly AI to accidentally walk over them.

@sunzenshen sunzenshen requested review from a team and AdamTadeusz December 16, 2025 04:33
AdamTadeusz
AdamTadeusz previously approved these changes Dec 16, 2025
@AdamTadeusz AdamTadeusz requested a review from a team December 16, 2025 17:39
@sunzenshen sunzenshen force-pushed the bot-avoid-bumping-friendlies branch from 046af2c to b5c5f56 Compare December 17, 2025 01:40
@sunzenshen sunzenshen added the Conflict conflicts with master label Dec 20, 2025
@sunzenshen sunzenshen force-pushed the bot-avoid-bumping-friendlies branch from b5c5f56 to c769cf6 Compare December 22, 2025 02:44
@sunzenshen sunzenshen removed the Conflict conflicts with master label Dec 22, 2025
AdamTadeusz
AdamTadeusz previously approved these changes Jan 1, 2026
@sunzenshen sunzenshen requested a review from a team January 1, 2026 20:53
Space out about 32 units which is about human width
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bots Related to bot players

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants