Advertisement

Zero drag space AI

Started by November 09, 2005 04:22 PM
3 comments, last by Timkin 19 years ago
In my 2d space game I am having issues with getting the ‘bots’ to throttle speed realistically. My game uses realistic zero drag physics (its space). Right now the bots tear ass at the player shooting, zoom past turn around and fly back at the player and repeat. It’s impossible to dog fight when the bots fly like that and it’s simply not fun. There is no speed limit to the ships just acceleration and fuel constraints. I am using a relative velocity calculation combined with a distance calculation, but it just doesn’t seem to be working right. Anyone have any tips?
-----------------www.stevemata.com
Instead of thrusting and turning based on where the ships are, thrust and turn based on where the ships will be in the future.

- Rockoon (Joseph Koss)
Advertisement
Have your AI choose it's ships actions so as to minimise the relative velocity of the two ships once they are within dogfighting range. When at far range, you want a high relative velocity, so you can close in. This should diminish to zero when the AI ship is behind the target ship. You can use the same principle to drive evasion strategies if the AI is being targetted (i.e., maximise relative velocity in this case).

Of course, maintaining a high relative velocity is a valid combat tactic which enables 'swooping' on ones prey. Of course, it its generally better when used in a gravitational field where the ship with the most energy dictates the combat.
Quote: Original post by Timkin
Have your AI choose it's ships actions so as to minimise the relative velocity of the two ships once they are within dogfighting range. When at far range, you want a high relative velocity, so you can close in. This should diminish to zero when the AI ship is behind the target ship. You can use the same principle to drive evasion strategies if the AI is being targetted (i.e., maximise relative velocity in this case).

Of course, maintaining a high relative velocity is a valid combat tactic which enables 'swooping' on ones prey. Of course, it its generally better when used in a gravitational field where the ship with the most energy dictates the combat.



The game mechanics could be adjusted to require a long sustained dwell (aiming at target) -- alot of small shots instead of hitting one blast on a single pass.

If all the shots are ballistic, dodging by the target will prevent its effectiveness for the 'one pass' tactic, requiring 'dogfighting' to repeatedly shoot with a smaller aim angle and follow the targets dodge.

How any guided weapons are to be handled -- countermeasures (ECM/decoys/limited lockon range/launch borsite, etc) that lower their effectiveness.

Quote: Original post by Anonymous Poster

If all the shots are ballistic, dodging by the target will prevent its effectiveness for the 'one pass' tactic, requiring 'dogfighting' to repeatedly shoot with a smaller aim angle and follow the targets dodge.


...and yet it proved effective for the Luftwaffe in WWII. ;) Of course, as I indicated above, that was fighting in a gravitational field where relative energy really makes a big difference. While I agree that diving in on ones opponent and taking a low probability shot is less likely to result in a kill...it's also less likely to result in you being killed. Obviously, if you have the time and opportunity to move into a safe kill position giving a high probability shot, then you'd take it. But the longer you dwell on a target, the longer someone can spend doing the same to you. ;)

This topic is closed to new replies.

Advertisement