Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reworked the groundwar pathfinding. Did not touch much the overall infrastructure and AI logic. It mostly changes how passability checks are made and re-pathing strategy.
Some issues fixed:
Non exhaustive list of changes:
Tile reservation is used instead of collision detection. This avoids issues that could come from fractional location coordinates, where multiple units might occupy the same node for pathing purposes. A tile is reserved by a unit as it starts its movement into it. The reservation is cleared when it arrives in the target cell.
Side note:
Example videos:
https://drive.google.com/file/d/1Bd2k24DwUuamReztlFiDN7TmdGroS_HL/view?usp=drive_link
https://drive.google.com/file/d/1uS8y2frbkkevi6M51F4Krti80pg5hYrs/view?usp=drive_link