chessmasterhong / WaterEmblem

https://chessmasterhong.bitbucket.io/projects/WaterEmblem/
118 stars 27 forks source link

Improve A* pathfinding algorithm with terrain weights #59

Open DrkSephy opened 10 years ago

DrkSephy commented 10 years ago

Pathfinding currently ignores arbitrary weights (terrains). Perhaps its time to start implementing a new A* algorithm?

chessmasterhong commented 10 years ago

Yes, thanks for the reminder.

DrkSephy commented 10 years ago

Could you post any resources you have on this issue? I'd like to assist as well.

chessmasterhong commented 10 years ago

Ideally, our end-goal should look something very similar to this.

Original post: http://www.briangrinstead.com/blog/astar-search-algorithm-in-javascript-updated Demo: http://bgrins.github.io/javascript-astar/demo Source code: http://github.com/bgrins/javascript-astar

docmarionum1 commented 9 years ago

Don't necessarily think you need A* considering efficiency isn't much of an issue for a turn based game. If I have the time, might give a shot at doing some sort of path finding algorithm which will at least take into account max distance and tiles that can be passed through but are occupied. As I told David, currently the the A* algorithm has those two hacked on at the end, which is why it produces bad results.