Peculiar Pathfinding in Design Philosophy
|
|
I am designing a turn-based ship battle system, and the A.I aspect of it has me a little discombobulated. The main problem I have is that movement is limited; they can only turn X amount of turns per Phase, and only by 45 degrees each turn. Also they are limited to Y forward steps.
Another problem is that ships fire sideways, so turning the A.I to face the enemy isn't an option; the A.I has to move as if to pass the enemy and line up its side with said enemy.
Also there are three types of ammunition; Grapeshot (which can only be fired into squares in the immediate vicinity of the A.I (or two squares away if the A.I is of a certain Skill Level) - Cannonball (which can fire in a straight line from the side of the ship up to 3 or 4 squares away) - and Longballs (which cannot be fired closer than 3 squares away or nearer than 5) - this means the A.I has to work out how far to one side it needs to go.
I'm just having some trouble working out the maths. If it helps, the average A.I can turn 3 times per Phase, and move forward 5 times. Any help would be greatly appreciated.
~Ease~
|
There's a lot of functionality there that would likely be of
help to you, such as getting the angle between two points.