Skip to content
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

1123 use pathfinding in actual bot behavior #1129

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

mFragaBA
Copy link
Contributor

@mFragaBA mFragaBA commented Mar 18, 2025

Motivation

On #1112 and #1119 we introduced a pathfinding module and used it on bot behavior but under a flag but we were not using it for anything relevant.

Closes #1123

Summary of changes

On this PR we remove the pathfinding flag and restore the pre-existing bot behavior (:move, track, attack) but consuming the pathfinding module instead of naively moving towards a direction.

Besides this, I noticed a bug by which the bot was never entering the :tracking_player state, this was because it was using the attack distance instead of the track distance.

Dashing won't be used when tracking the player or moving for now as it adds complexity to pathfinding and path following. I openned an issue to re-introduce it but with another intention > #1137

How to test it?

Start the backend locally. Either on the web client or on Unity (selecting localhost as the server), run a new game. Check that now bots can actually chase you down, though now they can attack (like before the pathfinding PoC changes).

Checklist

  • Tested the changes locally.
  • Reviewed the changes on GitHub, line by line.
  • This change requires new documentation.
    • Documentation has been added/updated.

@mFragaBA mFragaBA force-pushed the 1123-use-pathfinding-in-actual-bot-behavior branch 2 times, most recently from 8d6a2f9 to 96f112b Compare March 19, 2025 18:40
@mFragaBA mFragaBA force-pushed the 1123-use-pathfinding-in-actual-bot-behavior branch from 7a093fd to 0f03a51 Compare March 25, 2025 17:46
@mFragaBA mFragaBA marked this pull request as ready for review March 25, 2025 20:56
@mFragaBA mFragaBA marked this pull request as draft March 27, 2025 17:31
@mFragaBA
Copy link
Contributor Author

converted to draft until #1136 gets merged

@mFragaBA mFragaBA force-pushed the 1123-use-pathfinding-in-actual-bot-behavior branch from 412a89c to cd66994 Compare April 1, 2025 13:28
@mFragaBA mFragaBA force-pushed the 1123-use-pathfinding-in-actual-bot-behavior branch from ae46d35 to a7850ce Compare April 3, 2025 20:42
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.

[BOTS] - Pathfinding: do something useful with pathfinding in bots behavior
1 participant