Page 2 of 2

Re: "Jumpy" weapon HUD sprites

Posted: Sat Jul 16, 2016 12:22 pm
by Graf Zahl
A_Raise/Lower still can change if they actually change the sprite/frame to decide whether to interpolate or not. For a one-state loop it should be safe by default.

Re: "Jumpy" weapon HUD sprites

Posted: Sat Jul 16, 2016 1:27 pm
by Xaser
Hmm, if "did the sprite/frame change?" is a thing we can check, a third mode to use for A_Raise/Lower is to only interpolate by default when the sprite's the same, then include both an "ALWAYSINTERPOLATE" and "NEVERINTERPOLATE" flag. That wouldn't really make sense for bobbing, though... for A_WeaponOffset, "maybe"? It'd certainly patch the reported issues.

Re: "Jumpy" weapon HUD sprites

Posted: Sat Jul 16, 2016 2:37 pm
by NeuralStunner
The list sounds good, other than a flag to switch it all off at once.

As far as the CVar, I've no qualms with it being mixed-mode: "Off", "On", "Bobbing Only"

Re: "Jumpy" weapon HUD sprites

Posted: Sun Jul 17, 2016 6:22 am
by Leonard2
And an "always" value please, I absolutely do not care myself for these random issues, I just don't want eye-tearing animations at all.

Re: "Jumpy" weapon HUD sprites

Posted: Sun Jul 24, 2016 3:01 pm
by TerminusEst13
Graf Zahl wrote:Again:

I am not a weapon mod designer, so I am not the most qualified person to resolve this issue. Unless you people give some feedback the only way to resolve this issue is to disable interpolation of the non-bobbing stuff.
One feature that I think would be good to be reminded of is one of the SetPlayerProperty values--specifically, PROP_INSTANTWEAPONSWITCH. It tends to be forgotten a lot, with the use of TNT1 AAAAAAAAAAAAAAAAetc 0 A_Lower, but it's still a cute little function. :D

For determining whether a weapon should not be interpolated in swapping away and whether it should, it might be good to do a check for if this property is enabled on a player and, if so, do not interpolate the switching. And then encourage modders to make use of this function (which will go about as well as expected, but an out is still an out).

Re: "Jumpy" weapon HUD sprites

Posted: Mon Jul 25, 2016 8:13 am
by Xaser
TerminusEst13 wrote:PROP_INSTANTWEAPONSWITCH... tends to be forgotten a lot
I "forget" it on purpose. The process of "set flag, do something, unset flag" is ugly and brittle, IMO, so I tend to avoid it when possible.

I'm not sure what you're proposing either re:PROP_INSTANTWEAPONSWITCH and interpolation behavior, unless you're talking about a hypothetical new flag.

Re: "Jumpy" weapon HUD sprites

Posted: Mon Jul 25, 2016 8:18 am
by NeuralStunner
I.E. "don't forget to skip interpolation if instant weapon switch is on".

Re: "Jumpy" weapon HUD sprites

Posted: Mon Jul 25, 2016 12:37 pm
by TerminusEst13
Yeah, NeuralStunner is right. Sorry, I wrote that when I'd just woken up, ahah.

Re: "Jumpy" weapon HUD sprites

Posted: Mon Jul 25, 2016 1:58 pm
by Xaser
Oh heh, okay. Yeah, makes sense to disable it for that case.

Re: "Jumpy" weapon HUD sprites

Posted: Thu Dec 08, 2016 10:55 am
by Graf Zahl
Changed it so that weapon interpolation must be explicitly set for A_WeaponOffset. Sorry, but no automatic solution will fix this.

Re: "Jumpy" weapon HUD sprites

Posted: Thu Dec 08, 2016 11:53 am
by Leonard2
I hope you didn't forget this.

Re: "Jumpy" weapon HUD sprites

Posted: Thu Dec 08, 2016 11:58 am
by Graf Zahl
I changed the PSprite offset handling and I did it in the code that sets the offset, not in the renderer, so everything else should not be affected. The only difference to that is that you have to explicitly tell A_WeaponOffset that you want to interpolate if you do not use WOF_Add.

It's really the only way to make this work reliably.