Hi,
I’m trying to solve a pathfinding problem. I’ve read that it’s possible to precompute a table of pathfinding routes based on a static map of nodes, thus making pathfinding from one particular node to another very easy at runtime.
Consider this image:
In the image above, the level is comprised of a grid-based layout, with either ‘walkable’ or ‘non walkable’ tiles. Therefore, the possible range of tiles that can be walked upon are any that show as white (clear) in the diagram.
Taking the example in the image, I want to be able to select any random point on the grid - shown in the image as the red dot - and have the player walk to that location, taking the ‘best route’ possible.
I know about A*, but I’ve also read that precomputed paths is also a worthwhile direction to go in. Considering the grid size of this game is likely to only be around the 20 x 20 mark (400 tiles) would this be a worthwhile way of calculating paths? Although I sure that A* has innumerable benefits - the structure of the levels will never (ever) change, so surely a dynamic run-time solution isn’t required?
I’d apprecaite anyone’s thoughts on this.
Thanks for your time!