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

Use the same logic or function for checking if a point or tile Is available #106

Open
trymnilsen opened this issue Dec 9, 2023 · 0 comments
Labels
bug Something isn't working part: pathing Issue relates to path-finding and resolving movement

Comments

@trymnilsen
Copy link
Owner

The movement component uses a different logic for checking if the next point to move than the pathfinding logic. This can cause an entity to become stuck in a loop of "path not available, generating a new one" and returning obstructed, only to do it again on the next tick. A path will be generated through a tile with a component that is considered blocking the movement.

Thoughts:

  • Who should own the "is point available" logic, can this be a single function?
  • Should we have a blocklist of points to not include in future pathfinding?
  • This was discovered in the movement for the buildJob but likely a problem anywhere that uses pathTo of the movement component, how should we handle multiple obstructed movement results?

this.isPositionAvailable(nextStep)

@trymnilsen trymnilsen added bug Something isn't working part: pathing Issue relates to path-finding and resolving movement labels Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working part: pathing Issue relates to path-finding and resolving movement
Projects
None yet
Development

No branches or pull requests

1 participant