Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Choppy frame rate, makes game unplayable #198

Closed
owner-w opened this issue Apr 28, 2023 · 21 comments
Closed

[BUG] Choppy frame rate, makes game unplayable #198

owner-w opened this issue Apr 28, 2023 · 21 comments

Comments

@owner-w
Copy link

owner-w commented Apr 28, 2023

I am getting a lot of frame skips, leading to a very choppy "low fps" experience. The stutter may seem tolerable at first but it is really hard to aim at monsters during intense battles, making it difficult to play. Video demonstration:

EX.PLUS.mp4

My resolution is 3840×2160@120hz.

Regular EX does not have this issue. See video of how it behaves there:

STABLE.EX.mp4
@atsb
Copy link
Owner

atsb commented Apr 29, 2023

This is Windows or a Linux distro? Because I do get some frame skips on Linux and I’ve been attempting to track this down for months. It only happens on uncapped mode too.

@atsb
Copy link
Owner

atsb commented Apr 29, 2023

I've narrowed it down to at least (what I think) is a combination of vsync and hardware. On one of my 'not so good' machines running Linux, it is dradful and very choppy. On Windows, I don't see it at all, it is very smooth and on my powerful Linux machine with a 12 core Xeon and RTX A2000 it very rarely skips a frame.

Try without vsync and see if it helps.

@azamorapl
Copy link
Collaborator

For what it's worth I had a similar issue, and I fixed it by disabling vsync in Nvidia Control Panel (the built in options did nothing).

@bubbleguuum
Copy link
Contributor

bubbleguuum commented Jun 19, 2023

EX+ has weird frame pacing issues depending on settings.
On my 4K 60hz G-Sync monitor I had to do all of these to have no stutter (micro or not), no (massive) input lag and no tearing:

  • In the NVIDIA CP settings for doom64ex+.exe, set 'Monitor technology' to 'Fixed refresh', to disable G-Sync
  • in the game, set V-Sync to Off
  • use RTSS framerate limiter to limit framerate to 60 (use your monitor max refresh rate here) for doom64ex+.exe

@atsb
Copy link
Owner

atsb commented Jun 20, 2023

Yeah, I thought I fixed it but I got it on one of my machines. This is an issue I've been trying to figure out. The original EX was also plagued ever so slightly by the same thing but somewhere, frame pacing is being delayed by what seems like 1ms every few frames.

@atsb
Copy link
Owner

atsb commented Jun 20, 2023

Ok, I have released RC2
https://github.com/atsb/Doom64EX-Plus/releases/download/3.6.5.8-rc1/doom64ex-plus-3.6.5.8-RC2-windows.zip

I tested this on a rather low-end compuer with an i3-1115G4 (UHD Graphics G4) machine. I had zero stutters and it was buttery smooth (Windows 11).

@bubbleguuum
Copy link
Contributor

bubbleguuum commented Jun 20, 2023

Thanks I did some test with that version, GTX 1080TI, 4K, fullscreen mode, in-game vsync off, no NVIDIA CP tweaks, no RTSS framerate cap.

All stutter seems to be indeed gone. But there is still some input lag (keyboard and mouse).

Using RTSS (Riva Tuner Server Statistics, part of MSI Afterburner) to cap framerate to 60 (my monitor's refresh rate) entirely fixes input lag, making input super responsive.
RTSS with the framerate cap produces super stable frametimes which are exactly 1000/60 = 16.6667 ms. This can be seen with its framegraph display.

Also I'm not sure the in-game "vsync off" setting works properly as (without the RTSS framecap) I got no screen tearing at all as if it was vsync on.

@atsb
Copy link
Owner

atsb commented Jun 20, 2023

Thanks for this, good news indeed. I'll clean up the latency and get the vsync working.

@atsb
Copy link
Owner

atsb commented Jun 20, 2023

Ok, feels like I have removed latency on movement now and I placed the vsync toggle within the code that draws frames, so each frame it'll be set instead of when just the renderer was active.

I also fixed the Interpolation setting crashing when used a lot and fixed the audio (my little experimental hack didn't work). I re-uploaded a new RC2.

@azamorapl
Copy link
Collaborator

Tried with RC2, I still have the same stutter as before. I am using a 120hz monitor, though.

@atsb
Copy link
Owner

atsb commented Jun 20, 2023

Yeah, I can’t test that at all. I might just cap the frame rate to 60 and no higher

@bubbleguuum
Copy link
Contributor

Tried with RC2, I still have the same stutter as before. I am using a 120hz monitor, though.

With v-sync off in-game ?

@atsb
Copy link
Owner

atsb commented Jun 20, 2023

I’ll do some experiments on my more powerful laptop later without any vsync implementation. Perhaps this could be causing some issues at higher refresh rates. The EX code is pretty weird in places and it maybe is interfering with the interpolation.

@azamorapl
Copy link
Collaborator

azamorapl commented Jun 20, 2023

Tried with RC2, I still have the same stutter as before. I am using a 120hz monitor, though.

With v-sync off in-game ?

Yeah, it makes no difference (or maybe slightly better? I can't tell if it's a placebo). Still pretty much like the video in the OP. Everything is fine if I explicitly disable vsync for the game in nvidia control panel, though.

@bubbleguuum
Copy link
Contributor

Tried with RC2, I still have the same stutter as before. I am using a 120hz monitor, though.

With v-sync off in-game ?

Yeah, it makes no difference. Plays pretty much like the video in the OP. Everything is fine if I explicitly disable vsync for the game in nvidia control panel, though.

Interesting, as in-game vsync off in RC2 really behaves as if it was on, according to my testing.

@atsb
Copy link
Owner

atsb commented Jun 20, 2023

Ok, I got it. I tried on my Linux machine which has an RTX GPU and yeah I still got stuttering, unless vsync was off in NVidia control panel. I have removed VSync and Antialiasing from the code and now, I get a totally smooth frametime graph on Linux (and probably Windows too). I'll do a little more fine tuning and push the code

@azamorapl
Copy link
Collaborator

Tried the latest build but the stuttering is still there for me, probably due to the higher refresh rate?

@atsb
Copy link
Owner

atsb commented Jun 21, 2023

Must be, I don’t get it at all on any of my systems

@atsb
Copy link
Owner

atsb commented Jun 22, 2023

I'll look into getting it working with higher refresh rates, but since this is now fixed for the majority of users, I'll close it.

@atsb atsb closed this as completed Jun 22, 2023
@bubbleguuum
Copy link
Contributor

bubbleguuum commented Jun 22, 2023

There is still framepacing issues and input lag in released v3.6.5.8.
Tested on Windows 11, 60Hz 4K monitor with 4K resolution set in-game (using Windows scaling workaround), G-Sync disabled, no NVIDIA CP tweaks, first level on WMD difficulty.

And there is noticeable stutter, but only in fullscreen mode, as shown by these framegraph spikes (fullscreen, no frame cap):

fullscreen_noframecap

In windowed mode, there is no lag spikes (as long as v_windowborderless is not enabled (set to 1)) but there is still noticeable input lag (windowed, no framecap):

windowed_noframecap

To get rid of input lag and have perfect 16.666ms frametimes most of the time, I still have to cap framerate to 60 with RTSS and use windowed mode (windowed, frame cap):

windowed_framecap

So long story short: it works best in windowed mode with a 60Hz RTSS framecap. Forcing vsync in NVIDIA CP does nothing for me.

@atsb
Copy link
Owner

atsb commented Jun 22, 2023

It must need to be capped to 60hz then internally, I’ll make sure to add this so the frame rate will have this internal cap. Not nice, but a solution. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants