-
Notifications
You must be signed in to change notification settings - Fork 6
1123 use pathfinding in actual bot behavior #1129
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
Conversation
8d6a2f9
to
96f112b
Compare
7a093fd
to
0f03a51
Compare
converted to draft until #1136 gets merged |
412a89c
to
cd66994
Compare
it was bugged and never entered the tracking state. Fixing it brought more errors Imma debug
this is to make bots a bit less aggresive
ae46d35
to
a7850ce
Compare
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.
Let's run some loadtests with current main and this branch before proceeding.
Did the loadtests! Thanks for suggesting them. Results here: https://www.notion.so/lambdaclass/Loadtests-bots-with-pathfinding-10-04-2025-1d0b9462471380e086f1fc5071eac2ce |
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.Note
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
Note
The bot state machine states are instant, we don't differenciate things to do when entering / exiting a state or behaviors to keep over the duration of a state (for example, when we attack we should wait at least until the character finished casting the attack before attempting to add new input > #1159. This is something the unity client already does). Also the back is not performing any validations regarding this, so it's possible for the bots to instantly cast multiple abilities which shouldn't be possible and also is not possible for the unity client > #1160
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