Author Topic: [Request] A couple of SSM feature requests  (Read 1621 times)

0 Members and 1 Guest are viewing this topic.

[Request] A couple of SSM feature requests
Hello folks, I was wondering if someone could look into how to implement a couple of features for subspace strikes:

Randomized SSM count and radius:

I'd like to be able specify a range rather than a single fixed value, to simulate for instance an unrefined system where not every missile make it to their target, or make warp in at a varrying distance to their target.


Warp time shorter than 4 seconds:

Right now, a strike's warp-in time cannot be less than 4.0 seconds, which is annoying to work around for a number of reasons, such as dealing with fast targets, or simply wanting your strikes to just "pop-in" and get to work, especially in mods outside of the FS-verse.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: [Request] A couple of SSM feature requests
Hello folks, I was wondering if someone could look into how to implement a couple of features for subspace strikes:

Randomized SSM count and radius:

I'd like to be able specify a range rather than a single fixed value, to simulate for instance an unrefined system where not every missile make it to their target, or make warp in at a varrying distance to their target.
Yes, I can do both of those (I was thinking of variable radii just the other day, actually). Can't give you a timeframe of when I'd find time to work on it, but as soon as I do, actually implementing it should be fairly simple.

Warp time shorter than 4 seconds:

Right now, a strike's warp-in time cannot be less than 4.0 seconds, which is annoying to work around for a number of reasons, such as dealing with fast targets, or simply wanting your strikes to just "pop-in" and get to work, especially in mods outside of the FS-verse.
This is a limitation in the fireball code (i.e. the code that handles the subspace portal effect)... SSM strikes are also not meant for fast targets, but it should be noted that a 4-second warp effect will fire its projectile after only 2 seconds (because it fires halfway through the duration). If you want an even shorter delay between the SSM strike starting and projectiles firing, you'd need to either change the fireball code to allow for shorter durations (which may be as simple as removing the < 4.0f check), or make the projectile fire while the subspace portal is still opening.
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.

 
Re: [Request] A couple of SSM feature requests
This is a limitation in the fireball code (i.e. the code that handles the subspace portal effect)... SSM strikes are also not meant for fast targets, but it should be noted that a 4-second warp effect will fire its projectile after only 2 seconds (because it fires halfway through the duration). If you want an even shorter delay between the SSM strike starting and projectiles firing, you'd need to either change the fireball code to allow for shorter durations (which may be as simple as removing the < 4.0f check), or make the projectile fire while the subspace portal is still opening.
That what I was afraid of. I remember glancing at the code several years ago and decided that it was way over my head back then. IIRC, the ships warp-in code is handled differently, correct? Ships can have all sorts of warp-in types and associated options.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: [Request] A couple of SSM feature requests
There is now a pull request for variable subspace strikes. I went ahead and made offset randomizable in addition to count and radius.
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 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: [Request] A couple of SSM feature requests
What about my request:

Warp type:

Usually, strikes come from subspace entry flashes. It would be better to have none of these for mods outside of the FS-verse, such as "Shattered Stars".
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 AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: [Request] A couple of SSM feature requests
What about my request:

Warp type:

Usually, strikes come from subspace entry flashes. It would be better to have none of these for mods outside of the FS-verse, such as "Shattered Stars".
So, wait. Do you want no warp effect, or a different warp effect? Because the former would be a lot easier to do with just using weapon-create or similar to spawn the weapons.

I'm not even sure if the SSM code would work with non-subspace warp effects, since it's not actually using the same code as ships warping in...
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 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: [Request] A couple of SSM feature requests
I want both: no warp effect and a different warp effect, much like ships.
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...