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

Nodes with weights #129

Open
tqtran7 opened this Issue Jun 14, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@tqtran7
Copy link

tqtran7 commented Jun 14, 2016

This is not really a bug, more like a wishlist. After looking at the source code, seems like your pathfinding algorithm only account for walkable or non-walkable nodes. It would be amazing to add weights to each node to account for different terrains like mud, swamp, rivers, etc...

@rohan-deshpande

This comment has been minimized.

Copy link

rohan-deshpande commented Jun 15, 2016

There's forks that will do this, I forked someone else's fork for this, can't check his name right now but all props go to him https://github.com/rohan-deshpande/PathFinding.js

There's already an open issue for it somewhere...

@rohan-deshpande

This comment has been minimized.

Copy link

rohan-deshpande commented Jun 15, 2016

Original fork https://github.com/paulrobello/PathFinding.js

There's a PR for it detailing the changes.

@tqtran7

This comment has been minimized.

Copy link
Author

tqtran7 commented Jun 15, 2016

I already forked it with a slightly different solution. 0 is now reserved for walls (since there is no upper limit for cost), 1 for walkable areas, and 2+ for other terrain types. Nevertheless, thanks for pointing it out.

@DefecateRainbows

This comment has been minimized.

Copy link

DefecateRainbows commented Jan 9, 2018

Best fork for this in 2018?

@lolney lolney referenced this issue Oct 7, 2018

Closed

Handle slowing #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.