Posted September 09, 2018 by EquusGames
#Tech
A test of the A* pathfinding algorithm implemented for the game in a single unit, to be use for the population Mechanics that will be added to the game, Color coded for easy debugging. The algorithm can change route dynamically by reformulating the path after changes in the terrain and guarantee a 100% finding of the optimal route given it exist.
The algorithm will be further improve by saving the paths between commonly used origins and destinations of the units (house >> factory), minimizing the number needed of calls of the A* algorithm.
The base algorithm was made following the Red Blob Games Introduction to A*.