Hello,
I have been programming games for some time now, but one thing I never really fiddled with too much was AI and clever steering behaviors.
I am currently implementing a game where you control 3D space ships along a 2D plane, using a point and click based system.
Movement of the units is really simple, they have a current transform and every tick they move towards their "goal" position in a straight line (if there is a goal position; otherwise the ship is just idle). As the ship translates into the final position on this 2D plane, it rotates at a given speed to face the target, so it doesn't feel too abrupt, for example as when the user tells the ship to go to somewhere in its behind area.
Now, I want to give my ships a bit more interesting movement. I am not touching the basics of the movement, it remains a simple point and click to make the ship go from a transform A to transform B, but I want the ship to traverse a more interesting path to get to the destination, respecting some local mobility rules of the ship itself.
Can you give me some guidance on how to tackle this issue? I am not sure what to look for, perhaps there are some well known algorithms to handle this?
Otherwise, what would be my next step, assuming I don't get any hints, would be to try and model some basic elements of a big starship, and try to play with those in how the ship moves.
1) Tilting: the bigger the ship, the less tilting it can do as it moves, and because of this, it also turns slower if it can't tilt. Tilting of the ship would vary depending on the dot product between the desired direction and current direction , in relation to current speed?
2) How much lateral/backwards thrusting power the unit has, which would influence how quick it can turn to face the target direction? (assuming there is any; some ships could simply have a unique propulsor at the back)
3) General mass of the ship would come into play with its thrust power to decide how quick it moves?
Thanks in advance :)