Input lag

This is the main shmups forum. Chat about shmups in here - keep it on-topic please!
Post Reply
User avatar
P_HAT
Posts: 1954
Joined: Mon Mar 12, 2007 10:52 am
Location: Ukraine; Yalta
Contact:

Input lag

Post by P_HAT »

We have interesting talk in IRC right now, but i don't have time to read all it now.

So i decide to make a thread about it.

Some mame versions have moar input lag than another.

Is if i wanna play Cave/Psykio/Raizing games in mame, which version are better fro specific games?

Also, maybe the mame isn't the best choice?
User avatar
nimitz
Posts: 875
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Post by nimitz »

First of all, make sure you always have vsync off since it adds delay

then

use shmupmame :P (edit)
Last edited by nimitz on Sun Jan 23, 2011 1:50 am, edited 1 time in total.
User avatar
P_HAT
Posts: 1954
Joined: Mon Mar 12, 2007 10:52 am
Location: Ukraine; Yalta
Contact:

Post by P_HAT »

vsync off in mame, or force off it in video drivers?
(it must be silly questions, but still >_>)
User avatar
nimitz
Posts: 875
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Post by nimitz »

both work,

you can disable vsync AND triple buffering in mame.

or

force vsync AND triple buffering OFF with your video card driver.

that being said vsync and triple buffering add delay for EVERYTHING, so might as well force them off
User avatar
Dave_K.
Posts: 4570
Joined: Wed Jan 26, 2005 5:43 am
Location: SF Bay Area
Contact:

Post by Dave_K. »

But won't you get lots of vertical tearing if you turn of vsync and triple buffer?
User avatar
nimitz
Posts: 875
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Post by nimitz »

Yes and No, really depends on the game and on your screen refresh.


But id MUCH rather have a bit of tearing than input delay that makes the games unplayable.
User avatar
bcass
Posts: 2671
Joined: Wed Mar 30, 2005 11:10 am

Re: Input lag

Post by bcass »

Just wanted to clarify the reason as to why this happens on the P3. Is it only a problem on non-CRT TVs? Is it a problem with the emulator(s)? Is it caused by the wireless pad? Or is it a combination of all these things?
User avatar
TVG
Posts: 919
Joined: Wed Jan 26, 2005 12:35 am

Re:

Post by TVG »

nimitz wrote:both work,

you can disable vsync AND triple buffering in mame.

or

force vsync AND triple buffering OFF with your video card driver.

that being said vsync and triple buffering add delay for EVERYTHING, so might as well force them off
So it adds lag but the standart method of detecting lag (pause and frame by frame advance) cannot detect it?
Is there another way of testing if and how much v-sync adds frames of input lag. It would be nice to know for a fact.
"In short, it comes down to spirit" - dodonpachi developper Kohyama.
User avatar
ncp
Posts: 781
Joined: Sun May 24, 2009 9:17 pm
Location: Tampa, FL

Re: Input lag

Post by ncp »

nimitz wrote:But id MUCH rather have a bit of tearing than input delay that makes the games unplayable.
I would say that 1 more frame of input lag is a far cry from making a game unplayable
Ex-Cyber
Posts: 1401
Joined: Thu Oct 25, 2007 12:43 am

Re: Re:

Post by Ex-Cyber »

The vagrant wrote:Is there another way of testing if and how much v-sync adds frames of input lag. It would be nice to know for a fact.
Record video with a 60FPS camera and have the relevant input switch wired up so that it turns an LED on. Then frame-advance the video and see how many frames go by between the LED turning on and the sprite reacting on-screen. Bonus points if you manage to wire up the same switch to also control a PCB running alongside the emulator.
captpain
Posts: 1783
Joined: Wed Jul 23, 2008 6:23 am

Re: Input lag

Post by captpain »

ncp wrote:
nimitz wrote:But id MUCH rather have a bit of tearing than input delay that makes the games unplayable.
I would say that 1 more frame of input lag is a far cry from making a game unplayable
It's not a far cry, but it doesn't make a game unplayable.

Still, given the choice, I'd easily take tearing over control lag. I'd rather know that my reflexes/planning/whatever weren't enough, rather than my reflexes/planning/whatever + anticipation because of input lag weren't enough.
User avatar
nZero
Posts: 2608
Joined: Wed Jan 26, 2005 1:20 am
Location: DC Area
Contact:

Re: Re:

Post by nZero »

The vagrant wrote:So it adds lag but the standart method of detecting lag (pause and frame by frame advance) cannot detect it?
You can only determine input lag that way, not output lag. For example, most LCD monitors also add lag due to image processing, but you wouldn't be able to detect it by frame advancing in MAME.
The vagrant wrote:Is there another way of testing if and how much v-sync adds frames of input lag. It would be nice to know for a fact.
Implemented in a perfectly ideal fashion, double-buffered vsync would add between 0 and 16.67ms of lag (0-1 frames) to a game designed to run at an even 60fps displayed on a monitor set for 60Hz refresh rate.
Image
User avatar
TVG
Posts: 919
Joined: Wed Jan 26, 2005 12:35 am

Re: Input lag

Post by TVG »

Okay I tested some more, by launching the same games on both mame+ extended and shmupmame 2.2, with vsync and triplebuffer on and off.

It appears the games were slightly more laggy with vsync, and triplebuffer doesn't affect anything. I tested vsync and triplebuffer standalone.

Very heavy emphasis on "appears". I do not trust my senses to be able to tell 1 frame difference. It might very well be placebo.

Tomorrow, I will do a test just for kicks. I will ask someone to launch the same game, one of those that only have 1 frame lag in normal mamen, under the same settings (without vsync or triplebuffer) in both of these emulators out of my view. I will then try to guess which one is running a couple times. Should be fun to see how many times I get it right, if any.
Then I will do the same with vsync on OR triplebuffer on, in shmupmame, and see if I can get it right that time.
It won't prove anything but I'm curious.
"In short, it comes down to spirit" - dodonpachi developper Kohyama.
captpain
Posts: 1783
Joined: Wed Jul 23, 2008 6:23 am

Re: Input lag

Post by captpain »

Maybe you should just not do that and practice a game for high scores instead.
User avatar
louisg
Posts: 2897
Joined: Wed Jul 20, 2005 7:27 pm
Location: outer richmond
Contact:

Re: Input lag

Post by louisg »

vsync off? :/ How would that add lag unless your program horribly sucks?
Humans, think about what you have done
User avatar
TVG
Posts: 919
Joined: Wed Jan 26, 2005 12:35 am

Re: Input lag

Post by TVG »

captpain wrote:Maybe you should just not do that and practice a game for high scores instead.
Being unemployed this winter means I have quite some time on my hands to do both.
vsync off? :/ How would that add lag unless your program horribly sucks?
Normal mame then unlagged mame, with v-sync off.
"In short, it comes down to spirit" - dodonpachi developper Kohyama.
gray117
Posts: 1235
Joined: Fri Jul 25, 2008 10:19 pm
Location: Leeds

Re: Input lag

Post by gray117 »

louisg wrote:vsync off? :/ How would that add lag unless your program horribly sucks?
vsync attempts to match a frame with latest screen refresh. Depending on the sync of your game and the speed[and/or stage] of this process likely delays are to be around 0.5 - 1 frames. Typically, with emulation, the implementation of vsync is strictly a separate end process. There are many means of vsync - some with bad consequences - dead space pc anyone?

The real issue with realtime graphics - ie. computer games - is that frame rates inevitably vary - even if only slightly. This complicates the issue and most vsyncs, although helping greatly, are still not 100% perfect.

Screen tearing can occur on all types of monitors : Particularly during moments of fast movement, or when frame rates change, which can exasperate other issues where typically one might see the use of motion blur to help with the visual [trick your eye]. Downside of motion blur of course is that it obscures image detail and is typically a post process/double render effect when dealing with real-time graphics - unless this a dedicated part of the renderer(+hardware?) this is another probable frame rate 'risk'.
Post Reply