Closed BryceMehring closed 10 years ago
We could use MOAIPathFinder.
As discussed during our meeting today, we might not need to use a pathfinder because the units on the map could follow a predetermined path. Having them follow a predetermined path would allow for more creative paths for the AI.
Generation of this predetermined path could be implemented with a pathfinder with weights on the graph in order to force the units to move in a certain pattern.
Basic movement implementation: cceaf2e049608befedb6c47d17bd30bf598ef4ea
Added pathfinding for maps which do not have a path, 6736d23ba21af090d58a9f2484132edb0bae1983 and 11caafda5b7a5f6c0c955f1769a93867376e4c31. This closes this issue.
Enemies will move along a predetermined path specified by the map.
Breadth-first search can be ran once per map to find the shortest path from each tile to the goal. Using this algorithm over A* has the benefit that the pathfinder only has to be ran once instead of for each enemy unit.
Source: http://www.redblobgames.com/pathfinding/tower-defense/