Skip to content

Conversation

@sunzenshen
Copy link
Contributor

@sunzenshen sunzenshen commented Dec 10, 2025

Description

Leverages the walk intention interface to slow down the travel speed of bots to allow their teammates to catch up when approaching the CTG objective.

Toolchain

  • Windows MSVC VS2022

Linked Issues

(Requires the above PRs to be accepted before, as currently bots in a team will clump together which presents a friendly fire and splash damage risk.)

@sunzenshen
Copy link
Contributor Author

Requires the bot spreadout and retreat behaviors to be merged in before this PR is viable, because as is this will cause bots to clump together into an amorphous blob:

bot_slow_down_for_teammates_poc.mp4

@DESTROYGIRL DESTROYGIRL added the Bots Related to bot players label Dec 10, 2025
nullsystem
nullsystem previously approved these changes Dec 10, 2025
@nullsystem nullsystem requested a review from a team December 10, 2025 18:22
@sunzenshen sunzenshen force-pushed the bots-walk-to-let-friends-catch-up branch from dafc207 to 675dea1 Compare December 11, 2025 01:31


//---------------------------------------------------------------------------------------------
QueryResultType CNEOBotSeekAndDestroy::ShouldAim(const CNEOBot* me, const bool bWepHasClip) const
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needed to allow CNEOBotSeekAndDestroy::ShouldWalk to instantiate the abstract class.

I decided to revert my original experiment with aiming to slow down since walking already was enough to let teammates catch up with the recent related bot updates.

@sunzenshen
Copy link
Contributor Author

With the other bot updates for path spread-out and retreating merged, the pacing looks more natural in my opinion:

bot_spread_retreat_slowpace_combined_clip.mp4

if (flTeammateSqDistToGhost < flMySqDistToGhost)
{
// Maybe I can catch up to my teammate up ahead
return ANSWER_UNDEFINED;
Copy link
Contributor

Choose a reason for hiding this comment

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

So if I'm reading this correctly then only one bot per team can ever be walking at a time because they are close to the objective. Perhaps an early return here only if any team mate is closer to the objective than "me" by some tweakable value, that way some number of bots closest to the ghost can all walk at once.

If you wanted to add something like that you would probably also need to count how many alive bots are within that tolerance where a bot is considered to be the same distance from the ghost as "me", so in the case where all the bots on a team are close together they don't all walk.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How many bots should be slowing down is also a good design question. In experimenting with CTG tactics in another branch, I'm wondering if slowing down any of the bots is a generally optimal strategy. For example, if the ghost was spawned closer to one team, it could make sense to just try to rush, but on the other team the same approach would lead to getting picked off one by one. I think it might be a good idea to let this PR wait until we decide on a default bot strategy for CTG, so that we have some behavior to compare with before and after this tweak.

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 guess one potential heuristic we could try when the other PRs slot into place is whether we should have teams that are closer to the objective should rush, but the other team that is calculated to be farther should engage in this logic of slowing down, so they can attack together in force.

Also, while this patch currently only has 1 bot slow down for the second up front bot on the team, perhaps we could calculate a ratio of how lopsided team counts are, so teams that are evenly stacked will have fewer bots slowing down than teams that are greatly outnumbered by the other team.

@sunzenshen sunzenshen marked this pull request as draft December 22, 2025 03:03
@sunzenshen sunzenshen closed this Jan 10, 2026
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.

4 participants