🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

pathfinding (3) When you create paths towards the star`s ends

Started by
4 comments, last by Calin 3 years, 4 months ago

… how do you know how far to extend the those ends i.e how big will the star be? Im really confused about how you build the star.

My project`s facebook page is “DreamLand Page”

Advertisement

I assume with ‘star’ you mean all visited path segments, starting from the origin of the search?

If so, you simply have to ‘extend’ until the goal has been found. (But i doubt that's the question you meant.)

If you mean the size of the open and closed lists, in a world with dynamic memory allocations, you generally don't even think about it. List containers deal with that problem all by themselves.

Since the lists contain tile positions, and assuming you have at most one state for each tile, an upper limit is the number of tiles in the world. I have seen games that store path-finding data in tiles, ie your open and closed lists get distributed over all tiles. Don't remember the details though, but it's an option.

Thanks guys. Looks like I need to study/research more to get to the bottom of it.

My project`s facebook page is “DreamLand Page”

To figure out A I realized I should first figure out what Dijkstra does and then deduce the difference between Dijkstra and A* . So what is Manhattan (in this context)?

My project`s facebook page is “DreamLand Page”

This topic is closed to new replies.

Advertisement