View Single Post
Old 06-13-07, 10:54 AM   #5
Dr.Sid
The Old Man
 
Join Date: May 2005
Location: Czech Republic
Posts: 1,458
Downloads: 6
Uploads: 0
Default

I did these computation once but without angles, only with parametric vector equations. That leads to quadratic equation, where you get time of the impact. Knowing that it's easy to extrapolate target's movement and adjust torpedo heading.

On larger distances there is very simple solution which omits closing/opening speed of the target. You just take distance of target divided by torpedo speed which will give you impact time. Then again you just shoot at extrapolated target position.
Exactly with this algorithm I made champion for few weeks in guntactyx bot programming game, where leading your shots was essential.

But hey .. the torpedoes in DW are guided. These computations are only good for targets moving straight, constant speed, no reaction. Expect him to flank away when he hears the torpedoes.

Then much more important thing is to know if he can run away from the torpedoes. With surface boats, very often, they really can do that (and human players do that all the time).

Knowing max speed of the target, max speed of the torpedo and torpedo's max range, you must compute safe distance, from which the target can't make it.

Sometimes target will also change course to 'clear the datum'. You must predict this and use more torpedoes .. like 3 .. one to the left, second to the right .. and one straight at the target for the case he will simply run away.

Last edited by Dr.Sid; 06-13-07 at 04:55 PM.
Dr.Sid is offline   Reply With Quote