Hmm..Input Lag
-
@mediamogul said in Hmm..Input Lag:
For anyone who doesn't know, you can test how many frames of lag a game has by using the RetroArch pause feature, then hold down a button that will invoke an action in game. Then, use the frame advance feature to move forward one frame at a time until you start to see the action take place in game.
Pardon my query, since I'm certain it's something beyond obvious, but how do I actually use this? On a PS3 pad, I invoke the hotkey pause, game pauses, then I press (or press and hold) eg "A for punch/shoot/jump", then my hotkey for Frame Forward - the game forwards but the supposed punch/shoot/jump action is not happening at all.
-
@youxia said in Hmm..Input Lag:
I press (or press and hold) eg "A for punch/shoot/jump", then my hotkey for Frame Forward
The two hotkey combos are likely interfering with each other. Try using the 'k' key from a keyboard to advance forward.
-
@mediamogul Thank you , I did not know about that. One day I just need to sit down and read everything about RetroArch I can. I'm also curious to see how much lag a person can take without noticing. A family member makes me play retro side scrollers but won't turn on their Game Mode on the television and I get so frustrated and how bad it is. They just laugh because they just think I stink at retro games.
-
@thedatacereal ugh I hate it when friends and family have their TV's configured wrong. Seems most people just leave the settings at default and think it's good enough. I usually go behind them and fix everything.
-
@quicksilver I agree. I even have offered to change it for them and compare it so they can see how much better it is but they think I am just making excuses for losing. I guess from now on I'll have to start carrying my own tv when i take my RPi over :O
-
Okay, I've managed to get it going and did some tests on my CRT TV (NTSC via composite). RPi 3B+ @800Mhz with USB PS3 pad and keyboard, Retropie 4.4. The number indicates how many frames occurred before the action commenced. Different games yielded different results hence the range.
Megadrive: 2-3
PC Engine: 1-3
SNES: 1-3 (Super Mario World = 2 if you want to compare with this test
ZX Spectrum: 2 to14 That 14 is a wildly high number which I don't think represents real value - definitely did not feel like that, perhaps something to do with NTSC vs PAL and/or my setup and emulator config
Commodore 64: 2
Mame: 3-4What's interesting is that using the "unsupported tweaks" (aka video_threaded / video_max_swapchain_images / video_hard_sync) in the above test made absolutely no difference. Perhaps I did something wrong, though not sure what could that be.
-
@mediamogul said in Hmm..Input Lag:
The two hotkey combos are likely interfering with each other. Try using the 'k' key from a keyboard to advance forward.
Finally I managed to test this in SNES emulator. The way I do is
- Hotkey+p to pause the game
- click Hotkey button + Joypad B + Keyboard k at same time periodically until jump happens
In Super Mario World it happens at frame 3. So, at least this part is normal.
But this is only one half of the story right? This just tests the emulators input lag. But there are other things going on too, the time button press is have to be registered and the video send to monitor and so on. I use USB iBuffalo gamepad, a HDMI to VGA converter on a pc monitor at 480p and have shaders on. It would be a wonder if there is no additional input lag somewhere. In gameplay, I do not recognize any input lag. But I want to be sure here. What would you recommend? It feels instantaneous, so its just for curiosity.I feel, I don't hijack this thread as it is on topic.
-
@thelostsoul said in Hmm..Input Lag:
But there are other things going on too, the time button press is have to be registered and the video send to monitor and so on. I use USB iBuffalo gamepad, a HDMI to VGA converter on a pc monitor at 480p and have shaders on.
Unfortunately , the run-ahead feature won't help with any of those situations, only the inherent latency that exists in the game's programing. For latency caused by LCD monitors, televisions, wireless controllers, streamcasting or even latency resulting from emulation itself, you'd need to employ other tactics, such as the one's listed here.
What would you recommend? It feels instantaneous, so its just for curiosity.
For me, the most important factors are always how comfortable the controls feel, how well they represent a game's original control scheme and are they noticeably working against me in any way. If everything feels fine, I say let sleeping dogs lie.
-
@thelostsoul said in Hmm..Input Lag:
But this is only one half of the story right? This just tests the emulators input lag.
I'm not so sure. If you press a button, and then see the action happen x frames later, then x is the entire lag. The lag-inducing things you describe have already happened.
Seeing as you're using a CRT yours is already very low, I wouldn't worry about it. -
As absolutely clever an idea as I think RetroArch's run-ahead is and as much as I love the results, I also believe it's been publicized a little confusingly. It's been stated that it will achieve latency below that of original hardware, and while that is entirely true, it's really only true for those using a CRT display and wired controllers. Any other setup can only leverage it as a means to reduce latency by however many frames a particular game happens to contain inherently. All other sources of latency still apply. A television's 'Game Mode' should still be active and wired controllers are still a good idea.
-
Maybe you are right, I should let the sleeping dog lie. But my curious nature can't do this and now I get involved (just a little bit, like a kid shouting to the dog from a distance).
While some research, I found an App for the iOS, which should help analyzing the input lag.
http://isitsnappy.com/
Unfortunately I only own an Android device, so I can't use this app. But at least its capable of 240fps.I only use USB (plus a wireless keyboard) devices for input and so I can't test it with an LED. But... two of the input devices have an built in LED, my Arcade Stick and the wireless keyboard. Pressing a button with turbo mode on the Arcade stick will the LED light up. This should be instant with button pressing, right? And would be the results of the Arcade Stick comparable to the Classic Gamepad?
-
Ok, I did a quick unscientific test, like described above with video recording LED of Arcade Stick. I did test Donkey Kong for Mame2003 and got an input lag of 8 frames. Not 100% sure if this is correct, but sounds quite high to me. With the method pausing the emulation, holding the jump button down (in turbo mode) and counting the frames until jump happens is 4 frames. Does this sound correct to you?
So, on my end for Donkey Kong on Mame2003, I have this:
4 frames input lag for games own lag plus emulation with pause
8 frames input lag for total hdmi to vga converter to monitor with video recording (including everything)So now, to find out the actual input lag in milliseconds, do I need to multiply 16.6 with the frame count? 4x16.6=66.4ms and 8x16.6=132,8ms? Is that correct?
-
@thelostsoul said in Hmm..Input Lag:
holding the jump button down (in turbo mode) and counting the frames until jump happens is 4 frames. Does this sound correct to you?
As long as you're not counting the first frame in which you actually see animation, it would be correct. Otherwise, it would be 3 frames.
-
I don't know what you mean by that. Why shouldn't I count the first frame of animation? Isn't that the start of it?
Here is an animated GIF for the setup with video capture: https://makeagif.com/gif/input-lag-retropie-44-raspberry-pi-3-donkey-kong-mame2003-emNiU0
(too big, can't upload it here)
Is my calculation about the input lag in milliseconds correct? -
@thelostsoul said in Hmm..Input Lag:
I don't know what you mean by that. Why shouldn't I count the first frame of animation? Isn't that the start of it?
What you're aiming to remove are only the inactive frames of animation, so that when you press a button, your character will react on the very next frame. If you include that first frame of action animation in your count and add it to the run-ahead frames, you'll effectively be deleting it from existence every time. This would not only create a problem in timing, similar to the latency that you're trying to get rid of, but it would also create visual artifacting.
Edit:
Is my calculation about the input lag in milliseconds correct?
That looks right.
-
@mediamogul Ah ok, thank you for the explanation. I am not 100% if I understand the whole topic, so need to learn more about it. I wasn't trying to remove it, I only was curious about the current state of the normal emulators on my actual setup with the monitor (and adapter between it).
So, your answer was in reference to the run-ahead feature, right? -
@thelostsoul said in Hmm..Input Lag:
I am not 100% if I understand the whole topic
Ha! you know, it's me being the one off topic here. A handful of lag threads popped up in the last week or so and I had originally responded here with info on the run-ahead feature. However, I have since moved it to a more appropriate thread. Sorry for the confusion. Nonetheless, the one point still stands that when determining input lag, you're only looking for inactive frames. Once an action animation has begun, that first frame of activity is the game being aware of and responding to input.
-
@mediamogul Haha, no wonder, its a hot topic everyone talks about it. ;-) Can't blame for this.
-
A CRT is the obvious choice to remove monitor lag. Even a really nice LCD TV can cause 5 to 7ms of input lag even in gaming mode. I spent time hunting for a low input lag TV and it still seems to produce about 3 to 5ms.
I am still on the lookout for a cheap CRT to play with, but I found the next best option. I have been using a 1ms rated gaming LCD monitor. There are several brands that sell these (my favorite is ASUS.) If you are okay with a model that's a year or two old, you can get one for less that 150USD on Amazon.
-
@beldar I have a high end gaming monitor with very low input lag. The 4ms or 1ms time only tells how fast the grey to grey is and doesn't tell full story. There are a lot of other things going on. An IPS panel monitor with 4ms grey to grey value can have less input lag than a 1ms TN panel monitor.
Mine is AOC IPS 144Hz (up to 165hz) with G-Sync. :-) I think that I wouldn't get any noticible lag with this one. There are a number of other reason why I choice CRT for retro gaming. And I wonder if the lag on CRT setup with hdmi to vga adapter is higher than my IPS monitor. For direct measurement and comparison I have to change some settings. Still lazy on this.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.