OverlayX/Y + Flags/Offset Enhancements

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: OverlayX/Y + Flags/Offset Enhancements

Re: OverlayX/Y + Flags/Offset Enhancements

by Xaser » Mon Oct 31, 2016 1:15 pm

This is probably implicit, but agreed with Leonard2 and Graf. That oughta square it away for everyone.

Re: OverlayX/Y + Flags/Offset Enhancements

by Major Cooke » Mon Oct 31, 2016 10:47 am

And hopefully can fix a certain bug that's been bothering me for a while.

Re: OverlayX/Y + Flags/Offset Enhancements

by NeuralStunner » Mon Oct 31, 2016 10:44 am

Agreed and agreed. The "never/default/always" setting is the best way to handle it.

Re: OverlayX/Y + Flags/Offset Enhancements

by Graf Zahl » Mon Oct 31, 2016 1:48 am

Agreed mostly. I think, though, 'offset' should be extended then by an optional third boolean parameter that can explicitly enable interpolation. With that the Hexen weapons could be fixed and everything was perfect.

Re: OverlayX/Y + Flags/Offset Enhancements

by Leonard2 » Mon Oct 31, 2016 1:36 am

The discussion at the time basically stopped at "when should we interpolate movements implicitely" here.
Looking back at it, here's what I think should be done based on one of Xaser's posts:
  • Bobbing: Interpolated period. Why would you want to disable interpolation for such a thing honestly?
  • Raise/Lower: Interpolated by default. Can be disabled with an A_Raise/A_Lower parameter.
  • A_WeaponOffset: Interpolated by default. Can be disabled with a parameter as well. IIRC this function came around at the same time I did the overlay stuff so people using it should be aware of the interpolation which is why I think it should be on by default.
  • "Offset" keyword: I'll have to agree with Xaser here and make it off by default as old mods used (and could only use that) it without the interpolation in mind which gave rise to some reported issues HOWEVER I would like the possibility to turn it back on with a CVAR as I think it looks great regardless with some old weapons that made proper use of offset animations.
  • Finally, add a level-based CVAR with the following options: never interpolate, default behavior and default with enforced interpolation for the offset keyword on top of that for people like me.
This should make everyone happy: every issues should be fixed, modders have access to the interpolation using the proposed parameters and users can set it up to their liking.

Re: OverlayX/Y + Flags/Offset Enhancements

by Major Cooke » Sun Oct 30, 2016 1:54 pm

That's a question for Leonard2.

Re: OverlayX/Y + Flags/Offset Enhancements

by D2JK » Sun Oct 30, 2016 1:52 pm

Did anyone ever figure out a way to selectively disable the interpolation for overlaid/HUD sprites? The sprites tend to jump visibly if you change their offsets on the fly.

Currently, I figured I could weave in an invisible frame, and change to the new offset during this frame, hiding the jumping effect. The downside to this is that it requires 1 tic where the overlay is showing nothing, every time you want to change an offset.

Alternatively, I would have to manage my sprites in a way that keeps their offsets fixed throughout the animation.

Re: OverlayX/Y + Flags/Offset Enhancements

by Major Cooke » Tue Oct 11, 2016 12:54 am

I think I'm going to split the flipping from it and make a separate pull request so that part doesn't have to wait as long, if you think that's alright. A mere flip of the X axis, nothing more. I understand the renderstyle testing should still happen, but it was foolish of me to get something so simple barred by something much more complex.

Re: OverlayX/Y + Flags/Offset Enhancements

by Graf Zahl » Mon Oct 10, 2016 12:56 pm

I'm mainly waiting for someone else to drop a word but that doesn't seem to happen ever... :(

Re: OverlayX/Y + Flags/Offset Enhancements

by Major Cooke » Mon Oct 10, 2016 12:55 pm

I'm aware. I figured you were waiting on something for the alpha/style types, so I committed these separately since they're a lot simpler.

Re: OverlayX/Y + Flags/Offset Enhancements

by Graf Zahl » Mon Oct 10, 2016 3:24 am

Looks ok to me. Be aware that this conflicts with your other overlay related PR.

Re: OverlayX/Y + Flags/Offset Enhancements

by Major Cooke » Sun Oct 09, 2016 10:17 am

I would like Graf to confirm that though, it would be nice to hear from him directly on this.

Re: OverlayX/Y + Flags/Offset Enhancements

by Rachael » Sat Oct 08, 2016 8:12 pm

Well it passes my cursory test, then. But a more seasoned developer will need to do a more thorough check - as I've said, I'm not qualified to make that determination. (Yet)

Re: OverlayX/Y + Flags/Offset Enhancements

by Major Cooke » Sat Oct 08, 2016 8:07 pm

Oh. That line actually includes the same check plus a few others that are necessary in order to retrieve the function mPSPIndex which is what makes OverlayID tick. It makes sure a player exists, along with it being an action function and there being a non-null stateinfo stuffs.

So no worries there. :P

Re: OverlayX/Y + Flags/Offset Enhancements

by Rachael » Sat Oct 08, 2016 7:32 pm

Just this one: https://github.com/rheit/zdoom/pull/842 ... 196f7R1036 - like I said, it's probably just because I don't know what it does. The reason it red-flags me is because you replaced a nullptr check.
Though at this point I wouldn't be surprised if Zscript supercedes it entirely.
I had actually written up a much longer post predicting exactly this, but I deleted most of it before I submitted that. >_>
This is neither code bloat nor a hack.
I know. I didn't say this was, I was just saying in general.

Top