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

need some optimize on find pathing #21

Open
yawuliu opened this issue Nov 13, 2022 · 2 comments
Open

need some optimize on find pathing #21

yawuliu opened this issue Nov 13, 2022 · 2 comments

Comments

@yawuliu
Copy link

yawuliu commented Nov 13, 2022

image

@Retera
Copy link
Owner

Retera commented Nov 13, 2022

Yes, definitely. I had not gone to the extent of using a profiler, but based on my experience testing the code and thinking about how I wrote it, this is absolutely the case. The pathfinding is currently the cause of most visual framedrops.

Do you have a pathfinding algorithm in mind that would retain the same visual fidelity of "feeling right" with regards to larger and smaller units in larger and smaller pathways, but that would perform much better?

For example, here is a video from a year and a half ago, when I was testing CPathfindingProcessor with regards to how small units like the penguin can travel to small pathways that a hero like Jaina cannot reach:
https://www.youtube.com/watch?v=L2YLW0J6qLE

So, the pathfinding has a lot of tweaks to try to make it fit individual cases. But those tweaks do not change the fact that I started from the pseudocode of A* search on Wikipedia: https://en.wikipedia.org//wiki/A*_search_algorithm

Maybe you have in mind a better pathfinding approach, instead? Perhaps you could implement it and put it into a pull request?

@yawuliu
Copy link
Author

yawuliu commented Nov 14, 2022

Yes, definitely. I had not gone to the extent of using a profiler, but based on my experience testing the code and thinking about how I wrote it, this is absolutely the case. The pathfinding is currently the cause of most visual framedrops.

Do you have a pathfinding algorithm in mind that would retain the same visual fidelity of "feeling right" with regards to larger and smaller units in larger and smaller pathways, but that would perform much better?

For example, here is a video from a year and a half ago, when I was testing CPathfindingProcessor with regards to how small units like the penguin can travel to small pathways that a hero like Jaina cannot reach: https://www.youtube.com/watch?v=L2YLW0J6qLE

So, the pathfinding has a lot of tweaks to try to make it fit individual cases. But those tweaks do not change the fact that I started from the pseudocode of A* search on Wikipedia: https://en.wikipedia.org//wiki/A*_search_algorithm

Maybe you have in mind a better pathfinding approach, instead? Perhaps you could implement it and put it into a pull request?

I will do some try

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

No branches or pull requests

2 participants