A* alternatives?

BlitzMax Forums/BlitzMax Programming/A* alternatives?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

If you optimize your A* you should be able to process thousands of npcs no problem. I have run game servers that have done this without any issues on a fairly slow cpu.

you can put limits to path length


Extremely important. Also what brucey said about recalculations is a great idea, if necessary. If you don't have any dynamic tile entities (block tiles aren't moving) then this is highly suggested. The only thing you would need to calculate per move is whether a player/npc is in the next location, which can be detected using arrays containing the ID of the player/npc in the way.

If array[map].spot[x,y] > 0 then {Must recalculate, or attack?}.

If no players have been in a map or area for a long time, disable the npcs ai.