Brilliant guys, this will aid bomber whoring and SF/Fig defence greatly!!
Well done.
Missile Lock Algorithms
Question. Missiles such as hunters take a long time to lock. If I fire before I acheive full lock, then does it use no-lock, or a value somewhere between no-lock and full-lock?
I'd assume the latter ... but I'm still asking.
I'd assume the latter ... but I'm still asking.
Usually though, "skill" is used to covertly mean "match the game exactly to my level of competence." Anyone who is at all worse than me should fail utterly (and humorously!) and anyone better is clearly too caught up in the game and their opinions shouldn't count.
It was easy to find the code for this so.
Missiles with a max lock of 0.0 automatically go straight to displaying the locked icon as soon as your target is in range, even though they really aren't.
For other missiles, lock increments by a small amount every frame. The amount of the increment is proportional to the time since the last update, as you'd expect. It is also proportional to the angle of your view as:
(lockAngle - angleOffBow) / lockAngle
Which scales linearly from 0.0 to 1.0 from the edge of the lock radius to dead center.
The speed at which lock increases is also inversely proportional to the ECM value of your target ship's hull.
Nothing has a really extreme ECM value, as a rough guide, most ships are 1, constructors have 0.8, caps have 0.4 - 0.8, stealth fighters and bombers have 1.25, making them harder to acquire a missile lock on.
So if you keep your target at a roughly constant point in your view then lock increases linearly from 0.0 to 1.0. If the target is in the center of your screen, it reaches 1.0 at locktime * ECM.
Missiles with a max lock of 0.0 automatically go straight to displaying the locked icon as soon as your target is in range, even though they really aren't.
For other missiles, lock increments by a small amount every frame. The amount of the increment is proportional to the time since the last update, as you'd expect. It is also proportional to the angle of your view as:
(lockAngle - angleOffBow) / lockAngle
Which scales linearly from 0.0 to 1.0 from the edge of the lock radius to dead center.
The speed at which lock increases is also inversely proportional to the ECM value of your target ship's hull.
Nothing has a really extreme ECM value, as a rough guide, most ships are 1, constructors have 0.8, caps have 0.4 - 0.8, stealth fighters and bombers have 1.25, making them harder to acquire a missile lock on.
So if you keep your target at a roughly constant point in your view then lock increases linearly from 0.0 to 1.0. If the target is in the center of your screen, it reaches 1.0 at locktime * ECM.
Last edited by bahdohday on Thu Sep 28, 2006 9:31 am, edited 1 time in total.
good work bahdo and thx for sharing! although i'm a bit suprised actually that ppl weren't aware of the lock to pitch ratio already. No wonder mp3's are still around. (don't worry if u don't get it /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />).
Last edited by Doc_F on Thu Sep 28, 2006 10:10 am, edited 1 time in total.
-
NightRychune
- Posts: 3065
- Joined: Tue Feb 17, 2004 8:00 am
bahdohday, I'm not sure if your 2nd post was aimed at my question. Because, well, you answered: How does a missile acquire lock.
I asked: What happens to the tracking algorithm if I fire before I have complete lock?
I reckon madp would be right, but since you are digging through the code anyway, I figure I'd ask to make sure.
I asked: What happens to the tracking algorithm if I fire before I have complete lock?
I reckon madp would be right, but since you are digging through the code anyway, I figure I'd ask to make sure.
Usually though, "skill" is used to covertly mean "match the game exactly to my level of competence." Anyone who is at all worse than me should fail utterly (and humorously!) and anyone better is clearly too caught up in the game and their opinions shouldn't count.
Sorry I thought that would make it clear but I obviously got caught up in the explanation.
The lock value will be at an intermediate value between 0 and 1. Bringing back the velocity calculation from the first post:
Vector dV = m_target->GetVelocity() * m_lock - myVelocity;
So with a partial lock, m_lock could be 0.5 for example. This means it predicts the ship will only have moved half as far at the time of impact as it actually will have. Another way of looking at it is it predicts the velocity but only reacts to the prediction 0.5 as much as it should. Since a 1.0 lock missile actually gets the calculation right, it moves in a (relatively) direct path towards the site of impact. A 0.0 lock missile will follow a long arc around behind the target. A 0.5 lock missile will do something in between, following a curved path but one shorter than the unlocked missile.
Hope that answers the question.
The lock value will be at an intermediate value between 0 and 1. Bringing back the velocity calculation from the first post:
Vector dV = m_target->GetVelocity() * m_lock - myVelocity;
So with a partial lock, m_lock could be 0.5 for example. This means it predicts the ship will only have moved half as far at the time of impact as it actually will have. Another way of looking at it is it predicts the velocity but only reacts to the prediction 0.5 as much as it should. Since a 1.0 lock missile actually gets the calculation right, it moves in a (relatively) direct path towards the site of impact. A 0.0 lock missile will follow a long arc around behind the target. A 0.5 lock missile will do something in between, following a curved path but one shorter than the unlocked missile.
Hope that answers the question.
Very informative post, but when you launch countermeasures dont they normally just fly right behind you, and in a bomber vs bomber battle unless one bomber feels they have better gunners normally the bombers just head straight towards each other the only way to hit with an ab missile really and if cm's are deployed then the missile will head towards the cm which will be behind the bomber so the missile will have to go through the bomber to reach the cm.....missiles arent very good passing through anything other then space without exploding so it looks like the ab would hit the bomber.bahdohday wrote:QUOTE (bahdohday @ Sep 27 2006, 04:13 PM) So in a bomber on bomber battle, if you think you can hit your enemy with most of your Anti-Bases launched rocket-style in a perfectly straight line, you’ll give yourself a better chance if you don’t target him/her/it.
Now assuming the bomber with the cm strafes to avoid the missile then it doesnt matter whether the other bomber got a target lock or fired it like a dumb rocket as the ab would fly right past the bomber (I dont think the missiles are smart enough to have a proximity detonation thingy)
Of course I could be wrong on a multiple set of points, like countermeasures might deploy behind and to one direction thus countering a locked missile but not a rocket. Still for bomber vs bomber Rix or TF's usually win (especially thin Rix ones)



