"Jumpy" weapon HUD sprites

Bugs that have been investigated and resolved somehow.

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Jumpy" weapon HUD sprites

Post 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.
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: "Jumpy" weapon HUD sprites

Post 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.
User avatar
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

Post 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"
User avatar
Leonard2
Posts: 313
Joined: Tue Aug 14, 2012 6:10 pm

Re: "Jumpy" weapon HUD sprites

Post 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.
User avatar
TerminusEst13
Posts: 1625
Joined: Mon Nov 09, 2009 3:08 pm
Contact:

Re: "Jumpy" weapon HUD sprites

Post 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).
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: "Jumpy" weapon HUD sprites

Post 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.
User avatar
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

Post by NeuralStunner »

I.E. "don't forget to skip interpolation if instant weapon switch is on".
User avatar
TerminusEst13
Posts: 1625
Joined: Mon Nov 09, 2009 3:08 pm
Contact:

Re: "Jumpy" weapon HUD sprites

Post by TerminusEst13 »

Yeah, NeuralStunner is right. Sorry, I wrote that when I'd just woken up, ahah.
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: "Jumpy" weapon HUD sprites

Post by Xaser »

Oh heh, okay. Yeah, makes sense to disable it for that case.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Jumpy" weapon HUD sprites

Post by Graf Zahl »

Changed it so that weapon interpolation must be explicitly set for A_WeaponOffset. Sorry, but no automatic solution will fix this.
User avatar
Leonard2
Posts: 313
Joined: Tue Aug 14, 2012 6:10 pm

Re: "Jumpy" weapon HUD sprites

Post by Leonard2 »

I hope you didn't forget this.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Jumpy" weapon HUD sprites

Post 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.
Post Reply

Return to “Closed Bugs [GZDoom]”