-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Implement AStarGrid2D
class with jump-point pathfinding
#62717
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chaosus
force-pushed
the
jps_pathfinding
branch
2 times, most recently
from
July 4, 2022 19:30
eb26848
to
9061a67
Compare
Chaosus
force-pushed
the
jps_pathfinding
branch
4 times, most recently
from
July 5, 2022 05:49
75080f4
to
3df925a
Compare
reduz
requested changes
Aug 8, 2022
Chaosus
force-pushed
the
jps_pathfinding
branch
from
August 14, 2022 14:15
3df925a
to
8a2f8c0
Compare
@reduz Fixed all your remarks. Check again. New demo project version - |
Chaosus
force-pushed
the
jps_pathfinding
branch
from
August 29, 2022 09:10
8a2f8c0
to
8ee1f41
Compare
reduz
approved these changes
Aug 30, 2022
Chaosus
force-pushed
the
jps_pathfinding
branch
from
August 30, 2022 13:02
8ee1f41
to
527096d
Compare
Note: I've removed the |
Chaosus
force-pushed
the
jps_pathfinding
branch
3 times, most recently
from
August 30, 2022 14:25
8ce2bcc
to
84bb9c7
Compare
Chaosus
force-pushed
the
jps_pathfinding
branch
from
August 30, 2022 14:29
84bb9c7
to
4d7c1b9
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
After some discussion with Juan I decided to try to implement the class which containing a pathfinding grid. Compared to
AStar
classes it should be more effecient solution for the many users, since that class would support Jump-point search pathfinding algorithm (see https://en.wikipedia.org/wiki/Jump_point_search).Compared to AStar(right) the performance of this algorithm should be slighty faster in many situations (Elapsed Time is system ticks before call get_point_path function):
It also provides three different Diagonal modes which are:
Always
Never
At Least One Walkable
Only If No Obstacles
I based my implementation on modified version of https://github.com/juhgiyo/EpPathFinding.cs C# library (MIT licensed) which itself based on https://github.com/qiao/PathFinding.js (also MIT licensed).
Also I've included four heuristics modes which are:
Manhattan
,Euclidean
,Octile
andChebyshev
which are originally included in the original JS repository (https://github.com/qiao/PathFinding.js/blob/master/src/core/Heuristic.js). If its not desired I could cut it off and leave only Euclidean (which are closest to the existed AStar heuristic).If you want to test my PR you can download a demo project with it:
TestAStarGrid.zip (UPDATED: 14/08/2022)
I would leave it as a draft for some time, to be successfully checked by @Calinou, @akien-mga, Juan or other engine members.