Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide context to the pathfinder. #58

Open
Nauktis opened this issue Jan 5, 2016 · 5 comments
Open

Provide context to the pathfinder. #58

Nauktis opened this issue Jan 5, 2016 · 5 comments

Comments

@Nauktis
Copy link

Nauktis commented Jan 5, 2016

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.

@davebaol
Copy link
Member

davebaol commented Jan 5, 2016

You have to inform the graph before searching the path

@Nauktis
Copy link
Author

Nauktis commented Jan 5, 2016

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

@davebaol
Copy link
Member

davebaol commented Jan 5, 2016

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

@scooterman
Copy link

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

@davebaol
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants