AI Programming strategies

Blitz3D Forums/Blitz3D Programming/AI Programming strategies

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.

AI is a big word. I guess we're talking about some kind of enemy attack player in fps game AI, do we? Players may move freely, using some kind of A-Star or so pathfinding method. If they are doing realtime calcualtion then you may simply add them to the level walls one by one, from the closest to those far away: the enemy with the lowest distance to the player will do his moves first, then he will be added to the level walls that are used to find paths. The second nearest enemy will then have to walk around the first one. The third nearest will pass by the nearest and second nearest. And so on.

Although, I'm afraid true pathfinding complicates things a lot. Personally I'd rather use a number of waypoint tracks with lots of crossing points, where the enemies may "jump" on antother track, depending on the situation.