![]() ![]() I would recommend you to use the following solution, which is essentially what you were thinking: Using a straightforward implementation of A* would be impractical and certainly wouldn't make the game scalable in mapsize. However, it took about 5 seconds to run, which is about 4 seconds longer than ideal. I'm also considering a jump-point search, but I don't know it, and it'd be a pain to learn just to find that it can't do it.Įdit: I have attempted to add A*. Would this work and is there a better way? ![]() The algorithm would then find the best path of sections, then subsections, then sub-sub sections until it finds the best set of nodes. ![]() This would be repeated until each subsection contains 100 nodes. Each section would then be divided into 100 subsections. The algorithm I'm considering would divide the world into 100 sections, each with 1,000,000 nodes. So my question is: How can I find the best path? However, since the map is 10,000 by 10,000, there are 100,000,000 nodes, and to find this path through a conventional method such as A* or Dijkstra's would require a large amount of memory and a long time. I would like for a user to be able to set a location and have the computer instantly find the best path. I'm creating a game with a 10,000 by 10,000 map. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |