Points in Range
Finally! A method that will return all the points in range of a given point, using arbitrary distance measures.
This method is similar to A*in many respects (the type of parameters it takes, for example). It is in fact an implementation of Dijkstras algorithm. Since we require all (reachable) nodes in range, and not just a single path, we need not “guide” or search with a heuristic the way we have to do with A*.
The points in range function is also (typically) used differently: A* tests the validity of a single option, while the points in range function gives all possibilities. In addition to planning by game agents, the algorithm will probably also be used to visualise legal moves (for example, reachable squares in a turn based game). And when you visualise data, it can be made more compelling if you give a bit more detail. In this case, you may want to also know how much it will cost to move to a reachable cell (perhaps so you can color-code it). For this reason we also provide overloads that return the cost tables themselves, so you can provide the player with more information.
Keep your eye out; we will providing a detailed tutorial for this feature soon!
Find out more about Grids 1.10 Buy Grids now