"Jumpy" weapon HUD sprites

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: "Jumpy" weapon HUD sprites

Re: "Jumpy" weapon HUD sprites

by Graf Zahl » Thu Dec 08, 2016 11:58 am

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.

Re: "Jumpy" weapon HUD sprites

by Leonard2 » Thu Dec 08, 2016 11:53 am

I hope you didn't forget this.

Re: "Jumpy" weapon HUD sprites

by Graf Zahl » Thu Dec 08, 2016 10:55 am

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

by Xaser » Mon Jul 25, 2016 1:58 pm

Oh heh, okay. Yeah, makes sense to disable it for that case.

Re: "Jumpy" weapon HUD sprites

by TerminusEst13 » Mon Jul 25, 2016 12:37 pm

Yeah, NeuralStunner is right. Sorry, I wrote that when I'd just woken up, ahah.

Re: "Jumpy" weapon HUD sprites

by NeuralStunner » Mon Jul 25, 2016 8:18 am

I.E. "don't forget to skip interpolation if instant weapon switch is on".

Re: "Jumpy" weapon HUD sprites

by Xaser » Mon Jul 25, 2016 8:13 am

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

by TerminusEst13 » Sun Jul 24, 2016 3:01 pm

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

by Leonard2 » Sun Jul 17, 2016 6:22 am

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

by NeuralStunner » Sat Jul 16, 2016 2:37 pm

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

by Xaser » Sat Jul 16, 2016 1:27 pm

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

by Graf Zahl » Sat Jul 16, 2016 12:22 pm

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

by Xaser » Sat Jul 16, 2016 12:10 pm

All right, here's my set of recommendations (weapon modder's perspective):
  • Bobbing: Interpolated by default. Can be disabled on a per-state basis by setting a parameter flag on A_WeaponReady.
  • Raise/Lower: Interpolated by default. Can be disabled on a per-state basis by setting a parameter flag on A_Raise/A_Lower.
  • A_WeaponOffset: No interpolation by default. Can be enabled on a per-state basis by setting a parameter flag on A_WeaponOffset.
  • "Offset" keyword: No interpolation, period, as it's been superseded by A_WeaponOffset.
  • Finally, add a CVAR which disables interpolation globally, since some folks are not fond of it in general.
This likely strikes the right balance. Bobbing interpolation is on-by-default as it has not caused any issues as far as I know, and we know that offsets do cause weirdness with existing stuff (e.g. Eriguns2, Hexen), so they're opt-in. Raise/Lower are the grey area since there's at least one claim of it causing a 'jump' in a custom animation (though others work fine -- Zero Tolerance shows no faults, for instance), but since it affects all weapons, it's gotta stay on or else we'll never get PrBoom-style interpolation on vanilla guns and the like. Any issues caused by it ought to be a vast minority.

This scheme offers full control for modders, and for the people who dislike interpolation in general, they can turn it all off.

Re: "Jumpy" weapon HUD sprites

by Major Cooke » Sat Jul 16, 2016 6:22 am

I believe Leonard might be looking into this. At least, we've been talking, though he has yet to confirm or deny.

Re: "Jumpy" weapon HUD sprites

by Graf Zahl » Sat Jul 16, 2016 1:01 am

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.

Top