Current implementation of A* assumes, that all vertexes on the map have the same difficulty to reach them. This is not the case, when, for example, some RTS troops are traveling on different types of terrain, like grass, ice or sand. It would be nice to manipulate the "reachability" of vertexes.
Proposition
My idea of application of such modifier is to expand the formula of g_score calculation to include difficulty parameter stored in neighbor PathVertex object as a multiplier of distance between current vertex and neighbor. This can be used in dynamic changes of the environment, followed by rebuild of pathfinder.
Background
Current implementation of A* assumes, that all vertexes on the map have the same difficulty to reach them. This is not the case, when, for example, some RTS troops are traveling on different types of terrain, like grass, ice or sand. It would be nice to manipulate the "reachability" of vertexes.
Proposition
My idea of application of such modifier is to expand the formula of g_score calculation to include
difficulty
parameter stored in neighborPathVertex
object as a multiplier of distance between current vertex and neighbor. This can be used in dynamic changes of the environment, followed by rebuild of pathfinder.