Hi, currently I’m working on a simple 2d space shooter called towship (http://towship.sourceforge.net). Since it basically is a top down scroller with beefed up physics, the AI doesn’t have to be really complicated. However I am not willing to accept AIs flying fixed paths, that would be just a little too boring imho. While real pathfinding algorithms like a space-time A* seem a bit overkill, I thought so called artificial potential fields might just do the trick.
Since the big name might scare people off unnecessarily, I’ll explain a little:
Suppose the direction of the AI is determined by a number of artificial forces coming from various objects in the game. Typically the AI’s goal will attract the object and obstacles ilke walls and other ships will repel it. These forces, will guide the AI through the playing field. You can visualise this as a landscape where the goal is a deep valley and all the obstacles are hills, in this landscape the AI will slide towards it’s goal. This visualization also makes some problems apparant like local minima, which basically is a valley from which the ai cannot slide towards its goal without going uphill.
Anyways, while this seems like a pretty straightforward issue, it can get pretty complicated (try a google search and see all the scientific papers on the subject). I was hoping someone here would have some valuable insight into this, perhaps previous experiences? Maybe I’m aiming to high and should employ simpler methods, but I’m out of ideas in that respect.
Thanks in advance!