How should I replan A*?

Posted by Gregory Weir on Game Development See other posts from Game Development or by Gregory Weir
Published on 2011-02-11T20:56:16Z Indexed on 2011/02/11 23:34 UTC
Read the original article Hit count: 436

Filed under:
|
|

I've got a pathfinding boss enemy that seeks the player using the A* algorithm. It's a pretty complex environment, and I'm doing it in Flash, so the search can get a bit slow when it's searching over long distances. If the player was stationary, I could just search once, but at the moment I'm searching every frame. This takes long enough that my framerate is suffering.

What's the usual solution to this? Is there a way to "replan" A* without redoing the entire search? Should I just search a little less often (every half-second or second) and accept that there will be a little inaccuracy in the path?

© Game Development or respective owner

Related posts about ai

Related posts about path-finding