A* search algorithm
Unpredictable situations usually lead to a large amount of hours coding the extensive possibilities that the characters have. For this reason, it was necessary to think on a new way to create a better pathfinding system, where the characters could analyze the surroundings for themselves in real time and choose the best path to take. One method that has become very popular for this effect is using theta algorithms, which allows the characters to constantly search for the best path without it being necessary to manually set which points they need to follow.
The Theta search algorithm (A*) is a widely used search algorithm that can be used to find solutions for many problems and pathfinding is one of them. Using this algorithm to solve pathfinding problems is very common due to the uniform-cost search and heuristic search. The Theta search algorithm examines every corner of the map to help the character determine if it is possible to use that location or not, while trying...