"Jumpy" weapon HUD sprites
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: "Jumpy" weapon HUD sprites
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
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.
- NeuralStunner
-
- Posts: 12325
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: "Jumpy" weapon HUD sprites
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"
As far as the CVar, I've no qualms with it being mixed-mode: "Off", "On", "Bobbing Only"
Re: "Jumpy" weapon HUD sprites
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.
- TerminusEst13
- Posts: 1625
- Joined: Mon Nov 09, 2009 3:08 pm
- Contact:
Re: "Jumpy" weapon HUD sprites
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.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.
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
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.TerminusEst13 wrote:PROP_INSTANTWEAPONSWITCH... tends to be forgotten a lot
I'm not sure what you're proposing either re:PROP_INSTANTWEAPONSWITCH and interpolation behavior, unless you're talking about a hypothetical new flag.
- NeuralStunner
-
- Posts: 12325
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: "Jumpy" weapon HUD sprites
I.E. "don't forget to skip interpolation if instant weapon switch is on".
- TerminusEst13
- Posts: 1625
- Joined: Mon Nov 09, 2009 3:08 pm
- Contact:
Re: "Jumpy" weapon HUD sprites
Yeah, NeuralStunner is right. Sorry, I wrote that when I'd just woken up, ahah.
Re: "Jumpy" weapon HUD sprites
Oh heh, okay. Yeah, makes sense to disable it for that case.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: "Jumpy" weapon HUD sprites
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
I hope you didn't forget this.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: "Jumpy" weapon HUD sprites
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.
It's really the only way to make this work reliably.