-
Notifications
You must be signed in to change notification settings - Fork 124
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
[WIP] Introduce fast mouse polling for lower lag interpolation #1194
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
Nice starting point, I tested it briefly. Some issues I noticed:
I'll try to give more feedback later, I know it's WIP right now. |
I can repeat this. It appears to be fixed on my end by moving the Diffdiff --git a/src/i_video.c b/src/i_video.c
index ab3c7bc9..b5f9f6f1 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -544,9 +544,6 @@ void I_StartDisplay(void) // [crispy]
{
SDL_PumpEvents();
- // [AM] Figure out how far into the current tic we're in as a fixed_t.
- fractionaltic = I_GetFracRealTime();
-
if (usemouse && !nomouse && window_focused)
{
I_ReadMouseUncapped();
@@ -941,6 +938,9 @@ void I_FinishUpdate (void)
}
}
}
+ // [AM] Figure out how far into the current tic we're in as a fixed_t.
+ fractionaltic = I_GetFracRealTime();
+
}
// Restore background and undo the disk indicator, if it was drawn.
Does this fix the "pops" for you? |
That seems to work fine, or like Woof: Diff (Alt)diff --git a/src/i_video.c b/src/i_video.c
index ab3c7bc9..328e6b1e 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -542,11 +542,11 @@ void I_StartTic (void)
void I_StartDisplay(void) // [crispy]
{
- SDL_PumpEvents();
-
// [AM] Figure out how far into the current tic we're in as a fixed_t.
fractionaltic = I_GetFracRealTime();
+ SDL_PumpEvents();
+
if (usemouse && !nomouse && window_focused)
{
I_ReadMouseUncapped(); |
Fixes random "pops" when turning using keyboard. Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
When running uncapped, track last gametic's worth (28 ms) of mouse movement to determine if acceleration should be applied.
* Apply mouse acceleration in g_game. * Expand carry_t to include side and vertical movement. Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
Co-authored-by: ceski <56656010+ceski-1@users.noreply.github.com>
Finally, tried it out on both 60 and 120 Hz monitors. It's a God's job. The difference is notable even on 120 Hz! |
// Don't use localview if the player just teleported. | ||
!player->mo->reactiontime && | ||
// Don't use localview if a demo is playing. | ||
!demoplayback && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small thought: probably worth to check for !demorecording
here as well. At the moment, while demo recording there is a small notable jiterring between frames while camera rotation, most likely brought by "short tics".
This is my humble attempt to port to Crispy the fine work that @ceski-1 did for Woof. It's not ready yet but I thought it might be prudent to go ahead and get it out there for early review and testing.