Is this input lag? (Video)

Everything about latency. Tips, testing methods, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
User avatar
imprecise
Posts: 277
Joined: 16 Nov 2022, 13:47

Re: Is this input lag? (Video)

Post by imprecise » 15 Mar 2023, 17:32

Using the esc screen is a synthetic test. Does the strafe issue still exist?

There are multiple reasons this doesn't help:
strafing is constant input, not 1 time
the esc screen instantly jumps to 999 fps, which does not happen when strafing

User avatar
jorimt
Posts: 2484
Joined: 04 Nov 2016, 10:44
Location: USA

Re: Is this input lag? (Video)

Post by jorimt » 15 Mar 2023, 17:41

imprecise wrote:
15 Mar 2023, 17:32
Using the esc screen is a synthetic test.
It's not so much synthetic, as it is a baseline to rule out other factors; if his keyboard has normal responsiveness to an instantaneous transition in a game, then whatever transition is slower in the same game is likely in-built delay.

Different animations usually have different levels of artificial responsiveness and delay. I've experienced this in multiple games in my high speed and LDAT testing.

For instance, measuring a slower looking melee weapon animation in Overwatch will produce much higher average latency readings than a weapon with a faster looking animation because the former simply purposely takes longer to react to user input (to create the illusion of momentum and weight, etc).

He'd need to perform high speed camera, Reflex (built into some native G-SYNC monitors), or LDAT tests to confirm anything further.
(jorimt: /jor-uhm-tee/)
Author: Blur Busters "G-SYNC 101" Series

Displays: ASUS PG27AQN, LG 48CX VR: Beyond, Quest 3, Reverb G2, Index OS: Windows 11 Pro Case: Fractal Design Torrent PSU: Seasonic PRIME TX-1000 MB: ASUS Z790 Hero CPU: Intel i9-13900k w/Noctua NH-U12A GPU: GIGABYTE RTX 4090 GAMING OC RAM: 32GB G.SKILL Trident Z5 DDR5 6400MHz CL32 SSDs: 2TB WD_BLACK SN850 (OS), 4TB WD_BLACK SN850X (Games) Keyboards: Wooting 60HE, Logitech G915 TKL Mice: Razer Viper Mini SE, Razer Viper 8kHz Sound: Creative Sound Blaster Katana V2 (speakers/amp/DAC), AFUL Performer 8 (IEMs)

Sirito
Posts: 55
Joined: 17 Jun 2022, 06:48

Re: Is this input lag? (Video)

Post by Sirito » 15 Mar 2023, 18:25

jorimt wrote:
15 Mar 2023, 17:41
imprecise wrote:
15 Mar 2023, 17:32
Using the esc screen is a synthetic test.
It's not so much synthetic, as it is a baseline to rule out other factors; if his keyboard has normal responsiveness to an instantaneous transition in a game, then whatever transition is slower in the same game is likely in-built delay.

Different animations usually have different levels of artificial responsiveness and delay. I've experienced this in multiple games in my high speed and LDAT testing.

For instance, measuring a slower looking melee weapon animation in Overwatch will produce much higher average latency readings than a weapon with a faster looking animation because the former simply purposely takes longer to react to user input (to create the illusion of momentum and weight, etc).

He'd need to perform high speed camera, Reflex (built into some native G-SYNC monitors), or LDAT tests to confirm anything further.
Nice information

User avatar
RealNC
Site Admin
Posts: 3757
Joined: 24 Dec 2013, 18:32
Contact:

Re: Is this input lag? (Video)

Post by RealNC » 16 Mar 2023, 05:21

imprecise wrote:
15 Mar 2023, 17:32
strafing is constant input, not 1 time
the esc screen instantly jumps to 999 fps, which does not happen when strafing
It's not constant input. When you press a key, that's a key down event. If you hold the key, nothing happens. No events. When you release the key, you get a key up event.

Jumping to 999FPS shouldn't matter. You're trying to test keyboard latency, not game rendering latency.

Writing a simple tool to check keyboard latency is very easy. I whipped one up in 2 minutes in C++ and SDL2:

Code: Select all

#include <SDL2/SDL.h>

int main(int argc, char* args[])
{
    if (SDL_Init(SDL_INIT_VIDEO) != 0) {
        return 1;
    }

    SDL_DisplayMode info{};
    if (SDL_GetCurrentDisplayMode(0, &info) != 0) {
        SDL_Quit();
        return 2;
    }

    auto* window = SDL_CreateWindow(
        "Keyboard Latency Test",
        SDL_WINDOWPOS_UNDEFINED,
        SDL_WINDOWPOS_UNDEFINED,
        info.w, info.h,
        SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN | SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_ALLOW_HIGHDPI);
    auto* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
    SDL_GL_SetSwapInterval(0);
    SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);

    SDL_Event e{};
    bool flip = true;

    for (;;) {
        while (SDL_PollEvent(&e) != 0) {
            if (e.type == SDL_QUIT) {
                SDL_DestroyRenderer(renderer);
                SDL_DestroyWindow(window);
                SDL_Quit();
                return 0;
            } else if (e.type == SDL_KEYDOWN && !e.key.repeat) {
                if (flip) {
                    SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
                } else {
                    SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
                }
                flip = !flip;
            }
        }

        SDL_RenderClear(renderer);
        SDL_RenderPresent(renderer);
    }
}
Compiled executable is attached. Simply press any keyboard key to flip the screen between black and white.
keyb_lat.zip
(1.85 MiB) Downloaded 40 times
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

User avatar
dervu
Posts: 251
Joined: 17 Apr 2020, 18:09

Re: Is this input lag? (Video)

Post by dervu » 16 Mar 2023, 07:17

For things like that you should get baseline recording of perfect looking animation at same fps and then do another recording for suspected wrong looking animation overlaying with transparency too see if there is any discrepancy. Would be perfect if it was external cam recording with 1000fps. All synced with start of movement by turning of led that would also be recorded.
Of course it would have to be animation that is consistent in game.
Ryzen 7950X3D / MSI GeForce RTX 4090 Gaming X Trio / ASUS TUF GAMING X670E-PLUS / 2x16GB DDR5@6000 G.Skill Trident Z5 RGB / ASUS ROG SWIFT PG279QM / Logitech G PRO X SUPERLIGHT / SkyPAD Glass 3.0 / Wooting 60HE / DT 700 PRO X || EMI Input lag issue survivor

Sirito
Posts: 55
Joined: 17 Jun 2022, 06:48

Re: Is this input lag? (Video)

Post by Sirito » 16 Mar 2023, 10:12

RealNC wrote:
16 Mar 2023, 05:21
imprecise wrote:
15 Mar 2023, 17:32
strafing is constant input, not 1 time
the esc screen instantly jumps to 999 fps, which does not happen when strafing
It's not constant input. When you press a key, that's a key down event. If you hold the key, nothing happens. No events. When you release the key, you get a key up event.

Jumping to 999FPS shouldn't matter. You're trying to test keyboard latency, not game rendering latency.

Writing a simple tool to check keyboard latency is very easy. I whipped one up in 2 minutes in C++ and SDL2:

Code: Select all

#include <SDL2/SDL.h>

int main(int argc, char* args[])
{
    if (SDL_Init(SDL_INIT_VIDEO) != 0) {
        return 1;
    }

    SDL_DisplayMode info{};
    if (SDL_GetCurrentDisplayMode(0, &info) != 0) {
        SDL_Quit();
        return 2;
    }

    auto* window = SDL_CreateWindow(
        "Keyboard Latency Test",
        SDL_WINDOWPOS_UNDEFINED,
        SDL_WINDOWPOS_UNDEFINED,
        info.w, info.h,
        SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN | SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_ALLOW_HIGHDPI);
    auto* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
    SDL_GL_SetSwapInterval(0);
    SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);

    SDL_Event e{};
    bool flip = true;

    for (;;) {
        while (SDL_PollEvent(&e) != 0) {
            if (e.type == SDL_QUIT) {
                SDL_DestroyRenderer(renderer);
                SDL_DestroyWindow(window);
                SDL_Quit();
                return 0;
            } else if (e.type == SDL_KEYDOWN && !e.key.repeat) {
                if (flip) {
                    SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
                } else {
                    SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
                }
                flip = !flip;
            }
        }

        SDL_RenderClear(renderer);
        SDL_RenderPresent(renderer);
    }
}
Compiled executable is attached. Simply press any keyboard key to flip the screen between black and white.

keyb_lat.zip
Lol and that one youtube video saying that changing keyboard repeat delay to short will fix input lag :D

Post Reply