Partitioning an A* 400x400 map every frame

Started by
11 comments, last by ferrous 9 years, 11 months ago

You might want to consider beyond 'fog of war' if the units should make their path 'optimistic' when the full length is frequently out of sight. Nearby the need for correction (recalc path) might be normal when the situation IS visible, but is the nature of the game such that further away the units cant see and just assume their current best path (and that also ignoring dynamic blockage even for midranged visible paths - assuming the blockage might clear itself in the interim...).

This would allow keeping to the original planned 'coarse' path until closer proximity causes replanning (and employing the costly repathing) - thius lowering the number of times the long pathing needs to be recalculated.

Real units, if they couldnt see a blockage (do these units have radio or something or full view of the whole map ???) would go as far as possible THEN find a detour path ... but only when really needed. Perfect knowledge doesnt have to exist.

If by doing this you could eliminate alot of recalculation it might give you some significant improvement for your desired fast cycling.

You may have to try it and see if their is a significant improvement - and watch that there isnt excessive backtracking/wasted movement and tune it some (or figure that with YOUR game mechanics it doesnt get you anything and abandon this 'unit waits to see' method.

--------------------------------------------[size="1"]Ratings are Opinion, not Fact
Advertisement

Hey wodinoneeye,

Yeah I noticed that in my game, I would tell a unit or group of units to go around a wall that it didn't completely see, and the path it took, constantly readjusting, was dramatically different than pathfinding with perfect knowledge (which is how I used to do it, and how I'm going to go back to doing it). When I switch to pathfinding with full visibility, I'll probably get a speed boost from the lack of constant readjusting too.

How is the GPU tied to your pathfinding implementation? You have fog of war, but that could be done without any knowledge of what's being rendered.

This topic is closed to new replies.

Advertisement