grid - A Star Pathfinding -


i've implemented standard a* pathfinding algorithm , have working fine on 2d grid.

my question is, there way weight lines take "straightest" path instead of potential shortest path takes. instead of lines taking short path , moving in zigzag pattern try find right angle first.

any links resources or advice appreciated!

do mean they'd move diagonally on grid? you'd have open node expanding code expand (+1, +1), (-1, -1), (+1, -1) , (-1, +1), turning orthogonal instead of cardinal. if a* algorithm correct, favour single diagonal move on east north move.

if mean move across larger areas freely, different , harder do.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -