Author Topic: acceleration time doesn't work on dumbfires?  (Read 4197 times)

0 Members and 1 Guest are viewing this topic.

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: acceleration time doesn't work on dumbfires?
Yeah as Dragon said, unless someone changed that recently, homing primaries have never ever worked.
Ironically, it looks like the biggest thing stopping this from working is the same PF_CONST_VEL flag that was stopping acceleration time from working with dumbfire secondaries... but there are too many places in the code that check WP_LASER as shorthand for "shot that travels in a straight line" to make changing that by itself worthwhile.
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.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: acceleration time doesn't work on dumbfires?
As usual, something that should be simple is made not so simple by lousy coding in the FS2 engine. :) Of course, it's not like :v: ever needed homing primaries, and I bet that particular thing isn't something FSO added.

Mods like WoD would greatly benefit from homing primaries, that's for sure. Also, acceleration time on primaries could be an interesting feature (for Gyrojet-like guns, for example). I can see it messing with many things, though, starting from lead indicator and ending in collision detection code.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: acceleration time doesn't work on dumbfires?
As usual, something that should be simple is made not so simple by lousy coding in the FS2 engine. :) Of course, it's not like :v: ever needed homing primaries, and I bet that particular thing isn't something FSO added.

That's not lousy coding, FYI.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: acceleration time doesn't work on dumbfires?
Well, I suppose it's not all that bad of a practice, now that I think of it. It's certainly a reasonable assumption given nobody tries to tamper with WP_LASER. Still, shouldn't the check that tests whether a shot something is only moving in straight line look for PF_CONST_VEL flag instead? Unless it's a matter of performance, this seems like a more bulletproof way of doing such checks.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: acceleration time doesn't work on dumbfires?
I think acceleration time should be varied according to weapon type.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

Offline niffiwan

  • 211
  • Eluder Class
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: acceleration time doesn't work on dumbfires?
Well, I suppose it's not all that bad of a practice, now that I think of it. It's certainly a reasonable assumption given nobody tries to tamper with WP_LASER. Still, shouldn't the check that tests whether a shot something is only moving in straight line look for PF_CONST_VEL flag instead? Unless it's a matter of performance, this seems like a more bulletproof way of doing such checks.

No.  There are numerous places where "travels in only a straight line" has different implications for different modules.  For physics, it's "use this calculation to predict future positions".  For graphics, it's "check whether something is on the screen".  For the AI, it's "avoid flying into this path".  Etc.

The physics code makes extensive use of PF_ flags, as it should.  But (for example) the AI code has no business looking at the gory details of the physics code.  Separation of concerns (physics doesn't care about AI, AI doesn't care about physics) is good programming practice.
« Last Edit: February 03, 2016, 02:30:01 pm by Goober5000 »