Author Topic: How do we lead fighterbeams right now?  (Read 1227 times)

0 Members and 1 Guest are viewing this topic.

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
How do we lead fighterbeams right now?
I want to make sure I understand a couple nuances of fighterbeam behavior.

1) Does the AI understand how to lead with fighterbeams (i.e. to not lead at all?) What will it do if it tries to fire-link fighterbeams with a standard projectile weapon?

2) How is the leadpoint calculated for a fighterbeam on the player's HUD? Last I checked it treated the fighterbeam like a standard projectile weapon, creating a false aimpoint. Should we feature request a fix for this?

Thanks for being so cool, SCP!


 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: How do we lead fighterbeams right now?
I want to make sure I understand a couple nuances of fighterbeam behavior.

1) Does the AI understand how to lead with fighterbeams (i.e. to not lead at all?) What will it do if it tries to fire-link fighterbeams with a standard projectile weapon?
From experience I can tell that mixed beam-projectile weapons on ai fighters don't mix well. It will lead the target, and thus miss every beam shot. I'm not 100% if there is any difference in what bank the weapon is in. Ergo, it might pick the lead indicator of the first gunbank it has and aim with that. Need confirmation on that.

2) How is the leadpoint calculated for a fighterbeam on the player's HUD? Last I checked it treated the fighterbeam like a standard projectile weapon, creating a false aimpoint. Should we feature request a fix for this?
Yup, it uses velocity*life time to create the lead point, even for beams.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: How do we lead fighterbeams right now?
Mah cutlery

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: How do we lead fighterbeams right now?
I want to make sure I understand a couple nuances of fighterbeam behavior.

1) Does the AI understand how to lead with fighterbeams (i.e. to not lead at all?) What will it do if it tries to fire-link fighterbeams with a standard projectile weapon?

2) How is the leadpoint calculated for a fighterbeam on the player's HUD? Last I checked it treated the fighterbeam like a standard projectile weapon, creating a false aimpoint. Should we feature request a fix for this?

Thanks for being so cool, SCP!


Based on what I remember of the relevant code from investigating Mantis 3147, both the AI's primary leading and the HUD's leadpoint are probably using the weapon's "$Velocity:" without regard to the fact that it's not actually a projectile. As a workaround, you can set the weapon's speed to something really high (along with decreasing mass to avoid massive knockback), but the code should probably be changed to account for beams.

As for fire-linked primaries, the AI makes no attempt to account for that when aiming. Whichever bank is considered "current" is the one it uses for aiming; not sure which bank that's going to be (it depends on whether or not smart weapon switching is enabled, and if so, which weapon it considers most effective against the current target; otherwise, it'll be the first bank).
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.