I'm creating a turn based space ship strategy game with simultaneous turn resolution similar to Steam Birds. After all the orders are given, the ships run through a real time simulation where they rotate, accelerate and shoot each other.
The physics work similar to the old asteroids game. At the beginning of each turn the ships can be given a constant acceleration, they will then rotate into position so that their engines will be pushing them in the acceleration direction, and they will maintain the acceleration for the rest of the turn. Each ship has a maximum acceleration value based on their engine strength and mass.
I'm having trouble calculating the proper accelerations for the AI ships to get them to go where they need to go.
So I've gotI had a diagram here, but this video makes it much more clear what I'm trying to do. This is a player controlled ship moving with velocity V0 towards waypoint P1. Atthrough some point P0asteroids in the same way I need an AI ship needs to start accelerating with acceleration A in order to obtain velocity V1 towards the next waypointmove.

The actual magnitude of V1 doesn't matter, as long as it's in the right direction. I need to calculate V0, P0 and A. AdditionallyI've got a ship moving through some obstacles, the change from V0 to V1 should take place as quickly as possible because ifthere are waypoints defined that will guide the ship is moving through an asteroid field then it won't have room to take the turn slowlyobstacles. There are a couple of things I'm trying to calculate:
- I need to calculate how much the ship has to slow down to make a fairly tight turn so that it doesn't run into obstacles
- I need to calculate the acceleration to get the ship to change directions at the waypoint, again making sure that the turn is fairly tight
- Between the waypoints I would like the ship to accelerate to as high a speed as it can and still have time to slow down to make the turn
Any help here would be greatly appreciated. Thanks.