Precompute portal node graph in high-level pathfinder #1674
Labels
area: simulation
Involved in the game mechanics and simulation
good first issue
Suitable for newcomers
hacktoberfest
For newcomers from Hacktoberfest event
improvement
Enhancement of an existing component
just do it
You can start working on this, there should be nothing left to discuss
lang: c++
Done in C++ code
Required Skills: C++
Difficulty: Easy
In the openage pathfinder, a portal node graph is used in the first stage of the search to find the sectors the path travels through using an A* search algorithm. Currently, this node graph is created dynamically on every path request to the pathfinder which takes a significant amount of time. Since the node graph only changes very infrequently (i.e. only if the portals change), we can theoretically create it once on the first path request and then reuse it on subsequent requests.
To try out the current pathfinder, check out pathfinding demo 1 by running the following command:
Tasks:
Pathfinder::portal_a_star
. Note that there may be multiple pathfinding grids and each of them creates a differ ent node graph.Grid
class should be a good candidate.Pathfinder::portal_a_star
in such a way that it uses the precomputed portal node graph.CostField
on the grid gets changed.Further Reading
openage::path
pathfinding moduleThe text was updated successfully, but these errors were encountered: