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

Optimized pathfinder #12

Open
Frankgrandson opened this issue Nov 15, 2015 · 2 comments
Open

Optimized pathfinder #12

Frankgrandson opened this issue Nov 15, 2015 · 2 comments

Comments

@Frankgrandson
Copy link

Hi, I'm Franco, from Tucumán-Argentina. I'm working in a multiplayer game and I use "MicroPather" to do that. My question is: why when I call MyPath->solver(..), The grid need to be fill again every time? Can I fill it just once and then use it for ever? My grid is 1000x1000, so the time is very important here.

Thank you! Best regards.

@Dehaku
Copy link

Dehaku commented Nov 16, 2015

While I haven't checked it since my game map is constantly changing, I believe the pathfinder caches old nodes it's already checked, getting faster as time goes on.
Have you tried running it over the course of time, or simply once or twice then restarting the program?

@leethomason
Copy link
Owner

It does cache; that's why you must call Reset() if the graph changes.

Although - 1000x1000 is very big. That's a lot of memory it has to chew through to solve a graph.

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

3 participants