Have any of you done any AI for simulation type games such as flight sims and/or space sims? Here is what I have so far and it seems to work fine. Right now the AI is very tough to beat and it rams the player every time. It does not seem elegant to me but it works and works as well as most of my retail space sim games.
All the AI is doing now is accelerating when in pursuit mode and then pursuing and attacking when in attack mode. If the sum total of the length of the vector between the desired up, right, and look vectors and the AI's current up, right, and look vectors then it is ok to fire at the player.
This translates to a very tough AI opponent. Anyone have any better ideas? I can also push pre-made manuevers onto the action queue prior to or after a current action. So the following scenario is very possible in my system:
2. When past the player (when result of dot product of velocity vectors show vectors face the same direciton) start jinking.
3. Jink for a random period of time or until distance from player is sufficiently large.
4. Alternatively the AI could loop up over the player and then come back for another pass in attack mode.
4. Either transition to orbit state, perform a split s, or back to attack state.
5. If player is sufficiently far away and based on AI aggressivenes, transition back to waypoint mode.
Ideas are welcome.
Current attack mode manuevers supported:
- Split S
- Form up (based on preset AI formations)
- Break formation
- Basic manuevers such as yaw left/right, pitch up/down, roll left/right, and accel up/down
- Match speed