gdx-ai icon indicating copy to clipboard operation
gdx-ai copied to clipboard

Provide context to the pathfinder.

Open Nauktis opened this issue 9 years ago • 5 comments

For the moment the pathfinder finds connection between nodes by calling getConnections() on the IndexedNode.

My problem is that there is no context to decide if a connection should exist or not or to provide a different cost for the connection.

Simple example, you could imagine that some units could go over water cells while other cannot. Or that some agent have a different cost for a specific connection. Problem is, there is no way to tell for which entity (i.e. context) the pathfinding is running.

Nauktis avatar Jan 05 '16 15:01 Nauktis

You have to inform the graph before searching the path

davebaol avatar Jan 05 '16 15:01 davebaol

That could be a solution but you can only search one path at a time then.

Nauktis avatar Jan 05 '16 15:01 Nauktis

Current implementation of the indexed A* algorithm imposes this limitation already

davebaol avatar Jan 05 '16 15:01 davebaol

@davebaol sending the path request through getCost wouldn't help here? @Nauktis?

scooterman avatar Feb 10 '16 19:02 scooterman

Hmmm... PathFinderRequest is used for time sliced pathfinding only.

davebaol avatar Feb 10 '16 19:02 davebaol