Skip to content

Pathfinding for 2d tile based large world games #558

Answered by erlend-sh
erlend-sh asked this question in Q&A
Discussion options

You must be logged in to vote

jamadazi said:

in my (limited) experience, unless the world is really huge, an optimized (not naive) depth-first-search has worked better than A* for me, because it can be made to not require any extra memory
by optimized, i mean, storing a few bits of state alongside other per-node data (wherever the data of the nodes is), rather than allocating a queue to keep track of nodes to search
but really depends
might be just my specific niche :person_shrugging:

redblobgames said:

I think navmesh on a micro level will be better than a grid, but a grid is easier if your map is already using a grid because you don't have to construct a navmesh out of it.
Another thing you can do on a tile grid …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by erlend-sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant