Visualcode wrote:Catbert, it happens when you click your mouse. I guess in your words it would be Path Planning, but it is
called Pathfinding. Basically the player clicks a spot, a line is drawn, if the line collides then it is reformed
to the (normally) fastest route. However, it COULD be the first found route rather than the fastest.
(The line is not a physical line but instead just a way for me to discuss the drawn path)
This only interests me because I am a second year CS student and I was thinking about trying to eventually get involved in game programming. I believe Zer meant paths for objects with AIs (monsters, guard NPCs, et. al.) rather than for players, judging by how he said it was difficult. While clicking a tile away does, technically, involve pathfinding it is a simple procedure of finding the shortest relative path with a shortest path algorithm and executing it.
When an AI is having to evaluate threats, go after a moving target, change course midstream and deal with a changing surroundings, things indeed get much hairier. This is usually because the destination changes or the path becomes blockes by one or more dynamic objects. NPCs move in a loop, at least moving ones do, within a confines. That isn't as hard as a monster AI, which also has to determine a destination as well as do the above with pathfinding.
To clarify again, what I was referring to is what event (if it is event-driven?) triggers the monster AI 'code' or will trigger it: every time the object moves a tile, when the map nearby changes or when it encounters a new object or every tick?
A personal guess in terms of difficulty:
player pathfinding < NPC pathfinding (merchants in a closed off area) << monster AI pathfinding/threat evaluation
Finding an efficient algorithm to do this cannot be easy, does anyone know if he is going to use A-star pathfinding? I was looking at this stuff awhile back when I was toying with the idea making a pacman game.