Author Topic: Glide caps are broken and I'm stuck in the danger zone  (Read 8643 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
Glide caps are broken and I'm stuck in the danger zone
Hey folks. I think I've got a lead on a major issue with glide behavior.

It's possible to cap a ship's maximum glide speed at its maximum cruise speed, rather than its maximum afterburner speed. This is to prevent exploitative tactics in which you can lock a ship in permanent afterburner by gliding while at AB speed. We can't just let everyone slide around in the danger zone all the time.

Unfortunately, there's a pretty simple exploit to get around this. If you engage glide after releasing the afterburner key, but before you decelerate below your maximum cruise speed, you'll stay at your current (afterburnery) velocity. This is a really easy highway to the danger zone. It seems like the glide speed cap only realizes you're afterburning while you have the afterburn key pressed!

This is bad and degenerate for a lot of missions. Can anyone repro this behavior, and if so, can we find a fix?

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Glide caps are broken and I'm stuck in the danger zone
This is technically a feature request. I can bump it up my to-do list if you need this sooner rather than later.
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 General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Glide caps are broken and I'm stuck in the danger zone
I think it's important to have. It breaks a couple of existing missions.

 
Re: Glide caps are broken and I'm stuck in the danger zone
So that's what's going on! I just assumed there was some bug with the Custos-X that would sometimes cut my speed back to max after doing the burner-glide thing. Looks like the bug is the other way around :P

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Glide caps are broken and I'm stuck in the danger zone
I always thought this was intended behaviour, I actually rely on any glide capable ship being able to do this!!! :D
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 AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Glide caps are broken and I'm stuck in the danger zone
I always thought this was intended behaviour, I actually rely on any glide capable ship being able to do this!!! :D
It is the intended behavior, as mentioned on the Mantis issue; since it's counter-intuitive to many, however, it makes sense to introduce the alternative via a game_settings.tbl flag.

I'll try to find some time to work on this soonish.
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 karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Glide caps are broken and I'm stuck in the danger zone
I always thought this was intended behaviour, I actually rely on any glide capable ship being able to do this!!! :D

I don't see any logical reason why you shouldn't be able to glide at afterburner speed either, so it's definitely a feature.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 
Re: Glide caps are broken and I'm stuck in the danger zone
>logic
>fs2 speed caps
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Glide caps are broken and I'm stuck in the danger zone
Would this be best to implement as a per-ship switch or a per-mission switch or a per-mod switch or all of the above?  Like should you be able to override a per-mod switch to allow a certain mission or certain class of ship to do this?  It might be able to be a feature; not sure what techno-jargon would have to be resorted to to explain it, but it would be fun if done correctly, I would think.  (Perhaps to incentivize using a ship with other drawbacks, or to introduce a player to the advantage of certain piloting styles or somesuch.)

 
Re: Glide caps are broken and I'm stuck in the danger zone
We already have a good way of dealing with this implemented, the problem is that it's just not working properly.
The good Christian should beware of mathematicians, and all those who make empty prophecies. The danger already exists that the mathematicians have made a covenant with the devil to darken the spirit and to confine man in the bonds of Hell.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Glide caps are broken and I'm stuck in the danger zone
Ah, I see.  The fix is glitched?

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Glide caps are broken and I'm stuck in the danger zone
I always thought this was intended behaviour, I actually rely on any glide capable ship being able to do this!!! :D

I don't see any logical reason why you shouldn't be able to glide at afterburner speed either, so it's definitely a feature.

Would this be best to implement as a per-ship switch or a per-mission switch or a per-mod switch or all of the above?  Like should you be able to override a per-mod switch to allow a certain mission or certain class of ship to do this?  It might be able to be a feature; not sure what techno-jargon would have to be resorted to to explain it, but it would be fun if done correctly, I would think.  (Perhaps to incentivize using a ship with other drawbacks, or to introduce a player to the advantage of certain piloting styles or somesuch.)

I see there's some confusion here. This is not a feature and it's definitely a bug. First, let me do what I should've and be explicit about the name of the feature that's broken:

Quote
$Glide:                     YES
   +Dynamic Glide Cap:         NO
   +Max Glide Speed:         40

This ship has glide. It does not use a dynamic glide cap. It has Max Glide Speed defined, which is the maximum speed it's allowed to travel when gliding.

Why, Karajorma might rightly ask, does this feature exist? What logical reason is there for a ship to have its glide speed restricted to its max cruise speed (or lower)?

The answer is gameplay. Imagine you're flying a frigate or a big gunship. The player might want to strafe alongside a target, bearing their weapons on it. Or they might want to go really fast to evade incoming missiles or get somewhere. But we don't want to let them do both at once: this is a degenerate tactic for our mission, since it's clearly optimal to glide everywhere at AB speeds, take all power out of engines, and put it in guns/shields.

If your ship has equipment or abilities relevant to AB recharge, this is even worse. They're now extraneous, since you don't need to worry about AB recharge except when you're changing directions.

So we add '+Max Glide Speed'. But Max Glide Speed is a lie. It should actually be named 'Max Glide Speed If You Press Glide While Holding Down Afterburner, Otherwise Don't Worry About It.' With quick fingers the player can ignore Max Glide Speed.

This is a broken feature. One way or another, please fix it!

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Glide caps are broken and I'm stuck in the danger zone
Ah, I see your point now, it's that specific table setting (which we didn't use in Diaspora) that is broken rather than the way gliding is handled in general.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Glide caps are broken and I'm stuck in the danger zone
I see there's some confusion here. This is not a feature and it's definitely a bug.
[...]
This is a broken feature.
As I said on the Mantis issue, this is most certainly "working as intended", even though it's counter-intuitive and leads to degenerate gameplay. If you look at the part of the code responsible for glide caps (both dynamic and absolute), you see this comment:
Code: [Select]
// Only do the glide cap if we have one and are actively thrusting in some direction.
This code (and the associated checks) were added in r8628 by Sushi on March 27, 2012, with the following commit message: "Gliding bugfix: only 'decay' glide speed when actually thrusting."

So as much as this behavior may annoy you, it was most certainly intentional. Now, it shouldn't be hard to add in the alternative behavior (I was going to use a game_settings.tbl flag, but now I'm wondering if people would prefer the ability to change this behavior on a per-ship basis), but it's still adding a new feature rather than fixing an existing one.
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 General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Glide caps are broken and I'm stuck in the danger zone
Ask Sushi what up with that, I guess? If it's not important behavior to preserve that simplifies things greatly.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Glide caps are broken and I'm stuck in the danger zone
Now, it shouldn't be hard to add in the alternative behavior (I was going to use a game_settings.tbl flag, but now I'm wondering if people would prefer the ability to change this behavior on a per-ship basis), but it's still adding a new feature rather than fixing an existing one.
I'd like to be able to define this on a per-ship basis.
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 z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
Re: Glide caps are broken and I'm stuck in the danger zone
If somebody does end up making it so that the ship speed decays to below the glide cap, would they be so kind to make it so that said behavior is optional?

FringeSpace wants to be able to hold their top speed while gliding, as this is the same behavior as in Tachyon. Novalogic balanced this behavior by making the energy reservoirs charge comparatively slow, and energy transfers were lossy (I think around least 15% energy loss)
Secure the Source, Contain the Code, Protect the Project
chief1983

------------
funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Glide caps are broken and I'm stuck in the danger zone
I'm not sure I follow, z64555. Can't you just leave your Max Glide Speed high, or undefined? How would this change affect you at all?

I'm not sure I get the desire for a glitchy Max Glide Speed at all. Can someone help me understand why you want the following behavior?

  • Ship cannot glide above normal cruise speed if glide is engaged while afterburning
  • Ship can glide above normal cruise speed if glide is engaged after afterburning, but before decelerating
  • Ship cannot accelerate above normal cruise speed if afterburners are fired while gliding
  • If gliding above normal cruise speed, decelerate to cruise speed if you try to accelerate

Why would anyone want this weirdly specific, roundabout edge case? Why not just...increase your Max Glide Speed, or don't set it at all? Why let a player glide at high speed with a keyboard trick, but forbid them from gliding at high speed if they use the normal, intuitive controls?

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Glide caps are broken and I'm stuck in the danger zone
Yeah, I'm with GB on this. The behaviour you want is already available; making the Max Glide Speed behave as advertised instead of the way it works now is certainly desirable.
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 AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Glide caps are broken and I'm stuck in the danger zone
Well, if nobody wants to keep the current behavior, then the "fix" is as simple as reverting r8628.
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.