Andreas Bresser
Andreas Bresser
Hi Arun, The returned path is a list of coordinates in a 2D-Array representing a map. If you like to visualize that as SVG-path you have to calculate the positions...
Hi Arun, yes, it will be twice as long but why is that a problem? If you really want you can calculate the difference between one points position and the...
I think you are confusing Java with JavaScript. This library is for JavaScript, not Java.
Take a look at the getNeighbors function: https://github.com/qiao/PathFinding.js/blob/master/src/core/Grid.js#L144 Instead of getting all neighbors this algorithm should only get you the ones that don't have a wall. I would implement this...
My idea would be very similar to your sub-squares. you would just store the information of the 8 neighboring cells in a sub-cell not as own grid but as in...
Alternatively you could completely go with your solution and extend the getNeighbor-function to check the sub-cell and return only the center of the next cell if it is walkable, so...
Yeah, awesome work! I would need to store this `blocking` value in the node somehow. My first idea would be to put "special" values (maybe using negative numbers) in the...
That's the limitation of the a* algorithm, its fast but if you throw a lot of nodes at it it can become slow. I suggest instead of using pixel you...
@yaswanthakula that highly depends on your scenario and what exactly you want to do. For a general solution you could do something like every 100th pixel and create 10x10 zones...
Just search for "C++ A*", an implementation of Breadth First Search, Djikstra and A* can be found here: https://www.redblobgames.com/pathfinding/a-star/implementation.html#cplusplus Also take a look at optimizations there: https://www.redblobgames.com/pathfinding/a-star/implementation.html#optimizations