Original Post
Having been trying to understand how pathfinding could be done for years, I came across the A* algorithm, and I more or less understand it (on paper) I''m not sure I could code an implementation myself yet, but I think I''m beginning to understand how I could do it.
One question I''ve had is when you would call a pathfinding function. At least to me, it seems too costly to try and call a pahtfinding function using A* everytime you need it; it seems like it would take too much processing power. The only other option I would think of would be to somehow have a precompiled list of all the squares, and their distance to all the others. In this way, you could figure out all the pathfinding before the map is even loaded (ie: when you make the map itself) or maybe at run time, and only load it once.
Is anything like this done? (figuring out pathfinding data in a non real time fashion, like a giant look up table) I read some interesting topic titles which caused me to think that this exists, but unfortunately, I did not understand the content
I''m a newbie when it comes to game programming, especially AI. Still, I find it a fascinating topic and would like to learn more about it. It''s definetly something I could get into I think.
Peon