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

Remove last vestiges of input latency from Duke3D and RR main game loops. #21

Merged
merged 1 commit into from
Mar 25, 2020
Merged

Remove last vestiges of input latency from Duke3D and RR main game loops. #21

merged 1 commit into from
Mar 25, 2020

Conversation

mjr4077au
Copy link
Member

@mjr4077au mjr4077au commented Mar 25, 2020

The improvement is very subtle but I can definitely tell the difference. Might be less noticable at refresh rates higher than 60Hz (it's all I have until the AUD gets better).

  • Hack code from 9 years ago to break loop early removed. If game code is running slow, that's not the fix.
  • Get input and fill the input_t struct in same loop as G_DoMoveThings().
  • Remove unnecessary do/while (0) loop.

Some notes on the 'hack code', it might have made sense when it was committed, but when I altered to loop to run as fast as it could on my Core i7 4770k, the game easily ran 5-6 times faster than it should have with vsync on, and many magnitudes faster with vsync off. The shotgun unloaded 50 shells in about 2.5 seconds. It's just not needed.

…ops.

- Hack code to break loop early removed. If game code is running slow, that's not the fix.
- Get input and fill the input_t struct in same loop as G_DoMoveThings().
- Remove unnecessary do/while (0) loop.
@coelckers coelckers merged commit 2cbbe9e into ZDoom:master Mar 25, 2020
@mjr4077au mjr4077au deleted the Duke3DRR_MainLoopTweak branch March 25, 2020 17:30
coelckers added a commit that referenced this pull request Sep 16, 2020
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

Successfully merging this pull request may close these issues.

2 participants