Merge in SVN commit 8551

Moderator: Raze Developers

Post Reply
User avatar
mjr4077au
Posts: 829
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia
Contact:

Merge in SVN commit 8551

Post by mjr4077au »

As discussed here, SVN commit 8551 provided EDuke32 with the biggest uplift in input lag since the dawn of time. Testing between builds 8534 and 8572 will highlight the improvement.

Playing through 0.4.0, while it feels amazing, it's just not at GZDoom level in terms of performance with vsync enabled. I beleive this will remediate that last remnant of input lag I detect in Duke 3D games.

I don't know enough about the game to say what the 'smoothRatio' integer does in the rest of the file, but it's mentioned 40 times and is redefined at multiple points throughout the code. Whether it can be removed entirely or not, I'm not sure.

Code: Select all

int const smoothRatio = calc_smoothratio(totalclock, ototalclock)

Code: Select all

smoothRatio = 65536
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: Merge in SVN commit 8551

Post by Graf Zahl »

I would have already if that commit didn't need some major work. The input logic is where I made a lot of changes myself while hooking up the games with GZDoom's backend so the entire merge has to be done manually. That's why I put it off until I have more time available. Of course this will eventually have to be ported to all the games. NBlood already started with it but it seems incomplete. I'll also have to investigate what this code does precisely, not that it ultimately gets in the way of future work.

The 'smoothratio' value is for visual frame interpolation.
User avatar
mjr4077au
Posts: 829
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia
Contact:

Re: Merge in SVN commit 8551

Post by mjr4077au »

Graf Zahl wrote:I would have already if that commit didn't need some major work. The input logic is where I made a lot of changes myself while hooking up the games with GZDoom's backend so the entire merge has to be done manually. That's why I put it off until I have more time available. Of course this will eventually have to be ported to all the games. NBlood already started with it but it seems incomplete. I'll also have to investigate what this code does precisely, not that it ultimately gets in the way of future work.

The 'smoothratio' value is for visual frame interpolation.
Yeah that makes sense, I'm trying to experiment locally on the work laptop now that I have a full toolchain here to compile with but I'm no expert.
User avatar
mjr4077au
Posts: 829
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia
Contact:

Re: Merge in SVN commit 8551

Post by mjr4077au »

As an FYI, I tried to convert this:

Code: Select all

            CAMERA(q16ang)   = pPlayer->oq16ang
                             + mulscale16(((pPlayer->q16ang + F16(1024) - pPlayer->oq16ang) & 0x7FFFFFF) - F16(1024), smoothRatio)
                             + fix16_from_int(pPlayer->look_ang);
            CAMERA(q16horiz) = pPlayer->oq16horiz + pPlayer->oq16horizoff
                             + mulscale16((pPlayer->q16horiz + pPlayer->q16horizoff - pPlayer->oq16horiz - pPlayer->oq16horizoff), smoothRatio);
to:

Code: Select all

            CAMERA(q16ang)   = pPlayer->q16ang + fix16_from_int(pPlayer->look_ang);
            CAMERA(q16horiz) = pPlayer->q16horiz + pPlayer->q16horizoff;
from the first part of the commit to see how much it all went hand in hand, and yeah the outcome was pretty shit. When moving the mouse around, the world becomes very stuttery (no smoothRatio, right? :wink:). Will definitely need a better look than my hack job.
User avatar
mjr4077au
Posts: 829
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia
Contact:

Re: Merge in SVN commit 8551

Post by mjr4077au »

So, because I was at home and bored, I've had a go at merging this commit, and a few others that pertain to the main change in 8551. Effectively, these patches merge 8551, 8552, 8554, 8555, 8565, 8605 & 8619.

The mouse handles amazingly and the game feels exactly like GZDoom now in terms of mouse input.

During testing, I get some weird stuttering when moving forward, backwards or sideways (mouse input was never affected) that seems to be something to do with the FPS limiter in the engine. Setting it from 200 or uncapped and to say, 60Hz (my refresh rate) seems to make it go away. I need to have a further look but welcome extra eyes as I'm reaching a knowledge cap.
Last edited by mjr4077au on Fri Mar 13, 2020 10:52 pm, edited 1 time in total.
User avatar
sinisterseed
Posts: 1349
Joined: Tue Nov 05, 2019 6:48 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Merge in SVN commit 8551

Post by sinisterseed »

You're not alone experiencing stutters in the latest revisions, I've started experiencing that too with the fps limiter set to Auto.
User avatar
mjr4077au
Posts: 829
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia
Contact:

Re: Merge in SVN commit 8551

Post by mjr4077au »

lowskill. wrote:You're not alone experiencing stutters in the latest revisions, I've started experiencing that too with the fps limiter set to Auto.
Then perhaps the stutters I'm experiencing here in Raze with the changes made are the same reason for the stuttering you're referring to in EDuke32? (There's no Auto in Raze, so only assuming).

It'd be a shame not to merge this (or merge something that has the same impact as this), the combination of GZDoom's OpenGL stuffs and the mouse handling from these commits makes the game feel incredible.
User avatar
sinisterseed
Posts: 1349
Joined: Tue Nov 05, 2019 6:48 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Merge in SVN commit 8551

Post by sinisterseed »

mjr4077au wrote:
lowskill. wrote:You're not alone experiencing stutters in the latest revisions, I've started experiencing that too with the fps limiter set to Auto.
Then perhaps the stutters I'm experiencing here in Raze with the changes made are the same reason for the stuttering you're referring to in EDuke32? (There's no Auto in Raze, so only assuming).

It'd be a shame not to merge this (or merge something that has the same impact as this), the combination of GZDoom's OpenGL stuffs and the mouse handling from these commits makes the game feel incredible.
Ah what, you weren't talking about EDuke32 stuttering? I was referring to it when I mentioned that.

That wasn't happening in the Feb 12th build I used before, so something but have broken recently in it.
User avatar
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Merge in SVN commit 8551

Post by Rachael »

mjr4077au wrote:So, because I was at home and bored, I've had a go at merging this commit, and a few others that pertain to the main change in 8551. Effectively, these patches merge 8551, 8552, 8554, 8555, 8565, 8605 & 8619.

The mouse handles amazingly and the game feels exactly like GZDoom now in terms of mouse input.

During testing, I get some weird stuttering when moving forward, backwards or sideways (mouse input was never affected) that seems to be something to do with the FPS limiter in the engine. Setting it from 200 or uncapped and to say, 60Hz (my refresh rate) seems to make it go away. I need to have a further look but welcome extra eyes as I'm reaching a knowledge cap.

Pre-compiled binary for testing is here.
Can you do this as a pull request instead of diffs?
User avatar
mjr4077au
Posts: 829
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia
Contact:

Re: Merge in SVN commit 8551

Post by mjr4077au »

Last edited by mjr4077au on Sun Mar 15, 2020 2:32 pm, edited 1 time in total.
User avatar
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Merge in SVN commit 8551

Post by Rachael »

Thank you.
User avatar
mjr4077au
Posts: 829
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia
Contact:

Re: Merge in SVN commit 8551

Post by mjr4077au »

I've isolated the Raze-specific requirements for these SVN commits and adjusted the pull request accordingly. This works very nicely!

Download to pre-compiled binary to test out: https://drive.google.com/file/d/1yy7FDb ... sp=sharing
Submitted pull request for those interested: https://github.com/coelckers/Raze/pull/14

All upstream code credits to Terminx, I've just merged his work.
Post Reply

Return to “Closed Feature Suggestions [Raze]”