# Astar recommendations?

This topic is 4149 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Sorry if this isn't the right forum for this question but I picked what I thought worked best. I'm currently setting up an isometric tile based game and am in the process of figuring out how to implement A* into it. I was aiming for having various obstacles on the screen but preprogrammed "nav points" that are the only nodes used in pathfinding, rather than every single tile. You double click on an area and the program will calculate the best path around obstacles using only the nav point nodes. Does anyone have any recommendations, links, or code that would be the best way to approach this? Most information I can find is pretty much the same and it's not what I need.

##### Share on other sites
Why is it not what you need? Sounds like you have the setup (go from point a to point b, using this node graph, avoiding these obstacles), and you have the docs describing the algorithm...

##### Share on other sites
You might be able to do something that I thought about when playing with some A Star code that a guy had online a few years ago. He had a speed test for his code that generated a bunch of random paths between random start/end points on a particular map (like 500) and I noticed (since he had a visual of the paths as they were generated) that many of the random paths when thru the same points frequently. Somehow you could analyze and extract good points which had a high frequency of being reused to select your set of Nav points (a Monty Carlo method....)

Another method moght be randomly picking points and growing rectangles that have clear edges (stoping that edges growth when it hits an obstacle) and then using the centers of the resulting rectangles as you Nav points. You would have to do several cysle to fill in missed parts of the map (or another pattern using lines and/or growing diamonds/diagonal rectangles....)

##### Share on other sites
I would say you need to create a destination nav point on the place you clicked. But would probably do away with nav points all together, and use the tiles.

Astar with straight line heuristic should be plenty fast, at least fast enough to beat the user before he clicks anywhere else.

1. 1
Rutin
40
2. 2
3. 3
4. 4
5. 5

• 18
• 19
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633362
• Total Posts
3011531
• ### Who's Online (See full list)

There are no registered users currently online

×