posted 08-08- 05:05 PM
I would like to see planes capable of engaging multiple targets simultaneously. Here's what I'm thinking:there would be two levels of AI: plane AI and gunner AI. Plane AI has a flag EnemyNear which is true if an enemy is within the max range of the longest range gun the plane has. Then you have:
while(EnemyNear) {
For each guncrew in plane {
EnemyInRange = CheckForEnemy(gun position, gun rotation capability, gun range)
GunnerAI(EnemyInRange)
}
Wait X seconds before checking again
}
CheckForEnemy would see if an enemy was within range and hittable. If so, it would return True. GunnerAI would be some basic algorithm for tracking/shooting a target, if EnemyInRange is true. Otherwise the gun will lie dormant. The GunnerAI function would run parallel with the loop above, so that more than one gun could be firing at more than one target at a time. If there were multiple targets available, the GunnerAI could have some simple algorthim for picking a target (like take the closest one for instance).
This might be tricky, but it could really improve the lethality of bombers and boats!
charm