Missile Lock Algorithms

Tactical advice, How-to, Post-mortem, etc.
bahdohday
Posts: 73
Joined: Tue Mar 28, 2006 8:00 am
Location: London, UK

Post by bahdohday »

While working with the source recently I got curious about the technical details of missile locks. I found the code quite informative and thought perhaps some other people might as well, although I’m sure a lot of people know this stuff already. So this is a brief summary of what I found and a few of my thoughts on the subject. They might all be wrong. I will keep the interpretation to a minimum as I’m not enough of a vet to make too many grand statements. All my specific numbers are based on the current version of DN.

In the code missile lock is a floating point value with a range of 0.0 to 1.0. With 0.0 corresponding to no lock and 1.0 corresponding to full lock.

The effect of lock is to modify the effectiveness of the algorithm used by the missile to predict where the target will be at the time of collision. This algorithm uses the relative velocity of the target and missile, combined with the lock value as follows:

Vector dV = m_target->GetVelocity() * m_lock - myVelocity;

When there is no lock (0.0), the algorithm effectively ignores the velocity of the target and simply aims for it’s current position. When there is full lock (1.0), the algorithm performs a first-order prediction of where the target will be, based on the assumption that it is moving at constant velocity. Values in between cause it to under-predict the motion of the ship.

Countermeasures (chaff) attempt to stop missiles from hitting you. Missile lock has no influence over the effectiveness of countermeasures. Countermeasures act on every missile targetted at you and spoof each one in turn if the following condition is true:

random(0, c) > random(0, m)

Where c is the countermeasure effectiveness and m is the missile countermeasure resistance, both determined by the core.

The incoming missile sound is pitch adjusted based on the highest lock value of all missiles targetted at your ship in the following line of code:

m_psoundMissileWarning->GetISoundTweakable()->SetPitch(0.75 + fBestLock/2);

So low pitch (speed x0.75) warning sounds indicate only unlocked missiles incoming, whereas high pitched sounds (speed x1.25) indicate at least one locked missile incoming. This may help conserve countermeasures if you think you can dodge an unlocked dumbfire for example.

Firing a missile at a target which you cannot see (ie, they just cloaked) is the same as firing at empty space, as you would expect.

You can fire a missile with no target at all and it will act like a rocket. This isn’t useful very often, except it has the advantage that your target’s countermeasures cannot act on a missile which does not have them set as the target. For example, SRM Anti-Base 1 only has a countermeasure resistance of 1. Even countermeasure 1 has a 50% chance of spoofing the missile. Against countermeasure 3 you have a less than 1 in 6 chance of hitting. 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.

The case where lock makes the biggest difference to missile tracking performance is when the unlocked prediction is most different from the locked prediction. This would seem to be when target velocity perpendicular to the missile’s direction is maximum. For example when a ship is flying from left to right across your screen in range at a constant speed. In this case a locked missile will predict target position very well, unless it can’t turn enough (which is a whole separate discussion). In contrast an unlocked missile will take a curved path, sliding in behind the ship, taking a lot longer and potentially exceeding the missile lifetime.

A couple of final footnotes, in DN, SRM Dumbfire and LRM Killer never lock, they always use the position only targetting algorithm. MRM Seeker 1, MRM Quickfire 1 and LRM Hunter 1 have a maximum lock value of 0.75 and so are unlikely to hit a target in the scenario from the previous paragraph.

I hope that was interesting. I don’t know what to do with this except post it here. So if this isn’t appropriate I apologise. If I’m totally wrong it’d be nice to know too.
Paradigm2
Posts: 1594
Joined: Tue Jul 01, 2003 7:00 am
Location: College Station, TX

Post by Paradigm2 »

Very informative.
-Paradigm2
General_Freak
Posts: 207
Joined: Tue Mar 29, 2005 8:00 am

Post by General_Freak »

Hm, won't the missiles automatically adjust course so that they won't hit anything if they're not given a lock?
Image
Image
madpeople
Posts: 4787
Joined: Tue Dec 16, 2003 8:00 am
Location: England

Post by madpeople »

no, try launching, dont target anything, and fire some missiles
minigun
Posts: 824
Joined: Tue Jun 13, 2006 7:00 am
Location: minnesota

Post by minigun »

The incoming missile sound is pitch adjusted based on the highest lock value of all missiles targetted at your ship in the following line of code:

m_psoundMissileWarning->GetISoundTweakable()->SetPitch(0.75 + fBestLock/2);

So low pitch (speed x0.75) warning sounds indicate only unlocked missiles incoming, whereas high pitched sounds (speed x1.25) indicate at least one locked missile incoming. This may help conserve countermeasures if you think you can dodge an unlocked dumbfire for example.


This is good to know. Last night while miner D(scout with nan) i had a scout and sf attack me. The scout must have been firing dumb's becouse i got the low pitch warning. I used up 4 cm 1's. The sf came in with the frightening high pitched lrm missle lock. Tried to get behind the rock but got podded. If you can get your commander to buy cm2 or 3 and conserve them while making the sf use up all his missles on you, you really increase the survival rate of your miners.
Cry,'Havoc!' and let slip the dogs of war -Julius Ceasar
Image
parcival
Posts: 2872
Joined: Tue May 03, 2005 7:00 am
Location: Greece

Post by parcival »

Good info bahdohday! Thanks! /mrgreen.gif" style="vertical-align:middle" emoid=":D" border="0" alt="mrgreen.gif" />
ImageImageImageImageImageImage
" There is good in everyone. You just need the eyes for it. "
factoid
Posts: 929
Joined: Fri Sep 02, 2005 7:00 am
Location: Winnipeg, Canada

Post by factoid »

I'd written up a fairly detailed piece on chaff for the cadet program, but the sound thing is totally new to me. That's very helpful to know!
"I make it a point not to chat with AP off... space is vast, but it's never vast enough for my scout."
TheBored
Posts: 4680
Joined: Thu Jun 24, 2004 7:00 am
Location: At my desk staring at my monitor...

Post by TheBored »

Wow, the pitch thing for incoming missiles is really cool. I always thought I was just imagining the different sound /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

Thanks!

TB
Image
spideycw wrote:QUOTE (spideycw @ Nov 28 2008, 02:50 PM) All the retards are contained in one squad mostly (System X)
[18:48] <Imago> dont take me seriously
BlackViper
Posts: 6993
Joined: Thu Aug 07, 2003 7:00 am
Location: Green Bay, WI

Post by BlackViper »

Note already added to Cadet material /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
Always in the Shadows...
Greator_SST
Posts: 277
Joined: Sun Jul 27, 2003 7:00 am

Post by Greator_SST »

...really fine post!
...yea
Post Reply