-
Notifications
You must be signed in to change notification settings - Fork 79
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
Performance upgrade, less CPU usage, code refactor, optimization of A* algorithm, an attempt of fixing character getting stuck on "Hidden Stash" object at Chaos Sanctuary. #650
base: main
Are you sure you want to change the base?
Conversation
Code refactor, preserved caching, optimization.
Code refactor, proper collision detection and avoidance, valid pathfinding (even across area boundaries), performance upgrade.
Code refactor, added cache and cache efficiency (area-specific cache keys prevent cross-area conflicts), LRU cache prevents memory issues, optimized A* with results up to 20-30% CPU reduction.
Code refactor, proper Collision Handling in A* algorithm, Grid preprocessing fixes, Cost calculations for tiles/collisions, performance upgrade.
Add a check for FindNearbyWalkablePosition to to prevent issues with pather in certain areas, thanks to elb for the fix :)
There was an issue with the pather which was fixed by @elobo91 in |
`findNearbyWalkablePosition` -> `FindNearbyWalkablePosition`
Accidental removal of ctx.RefreshGameData()
Possible fix of bot getting stuck on "Hidden Stash" object at Chaos.
Updated |
On my first test of this PR, nova sorc got stuck on a stash just west of the star in CS. It didn't seem to get stuck when traveling to Viz, but on the way to seis. Buffing broke the char being stuck. There may have been an attack that caused the char to be right next to the stash, thus attacking may need a similar pathing check like this. |
@braccali1 that is strange because I never had similar issues with a lot of games in a row running 3 clients, could you tell me what exactly your character bugged on, I need name of the object that the character bugged, did it also try to cast anything or click on it or just stand on it without doing anything? EDIT: |
If I see it happen again I will try to grab the object id. The character was attempting to teleport over and over, but was stuck behind the stash. Also getting multiple attempts to teleport when already standing right next to a seal. |
Prevent pathfinding near hidden stashes by creating a 5x5 non-walkable zone around hidden stashes, forcing paths to detour.
Block interactions and improve safety checks, completely skips hidden stash interactions, moves to walkable positions before interacting with objects.
Improve movement reliability by avoiding getting stuck on blocked objects, maintains original timeout/retry logic, fixes "undefined variable" errors.
@braccali1 please try out the latest changes and let me know if any issues occur, thank you. |
Re-added `ctx.RefreshGameData()` & modified // Exint on timeout modification check for proper Hidden Stash ignore @ Chaos.
Re-add comments from original source.
Is there any reason this doesnt get merged? |
It has to be reviewed by hectorgimenez . its also not totally ready from what i reviewed . It could have been merged when null marked it for review at 9bb1cf8 |
Alright, because i like the sound of cpu usage optimizations :P |
Re-add comments, minor code refactor.
Add comments of logic.
Add comments.
Add comments.
Revert some changes.
astar.go:
path_finder.go:
path.go:
utils.go: