Jump to content



Photo
* * * * * 1 votes

Potential Flipper Lag Improvement Idea


  • Please log in to reply
357 replies to this topic

#181 Kernel

Kernel

    Enthusiast

  • Members
  • PipPipPip
  • 134 posts

  • Flag: ---------

  • Favorite Pinball: Stones 'n Bones

Posted 19 October 2016 - 12:40 PM

I'm very sensitive to lag since I've been playing competitively for some time (and I'm a musician like vogliadicane) so I'm very interested in this thread.

 

If VP9/PM5 is lag free, we can exclude from Toxie list:

a) The flipper button/keyboard itself (minor)

b) USB polling rate

e) Graphics driver (major, maximum prerendered frames tweaking can help)

f) Monitor/TV

 

I can also exclude PC hardware bottlenecks because I can reach 240 fps on some vpx tables (vsync off).

My 46" 60Hz TV has 28ms lag, rated "great" on display input lag database. VP9, PM5 runs super fast and with apparently zero lag.

 

@toxie: I've tried Dr.Dude table ad is better than others. Also Road House by Knorr is excellent, but not comparable to the responsiveness I have with VP9/PM5 tables.



#182 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 19 October 2016 - 02:27 PM

Super weird. Did you fool around with the "maximum pre-rendered frames" setting in the gfx driver control panel (while leaving that setting in VPX itself at 0)?

Could be that due to our new rendering pipeline in VPX (much more stages), that the driver buffers more frames now?

 

Will have to check that at some point.



#183 sliderpoint

sliderpoint

    Pinball Fan

  • Members
  • PipPipPipPip
  • 760 posts
  • Location:Spokane, WA

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 19 October 2016 - 02:31 PM

I vaguely remember talk about limiting timers to a minimum of 10 in VPX,  Was that put in and is that affecting the pinmame timer?

 

-Mike



#184 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 19 October 2016 - 03:29 PM

In the core.vbs there is nowadays an override for the default pinmame timer rate, so that it does not exceed 10. But this makes it just match the previous rate of VP9 (as PM5 increased the timer resolution from 100 to 1000 possible updates per second).

This should not really matter though, as these timers are only "virtual": They are only run in sync with the VP display (e.g. once per frame, all timers are run/catching up to the current point, then not running again, until the next frame).

 

But if somebody feels like verifying this with PM5: Look into core.vbs and search for PinMAMEInterval and set the else case to 10 instead of 1.

 

EDIT: Apart from that, there is only one more thing that gets limited: The -overall- time that all scripts take per frame. But this is only happening on tables that abuse timers a lot (e.g. feature very low interval), and then only very seldom (this was put in to avoid micro-stuttering on these tables), if a lot is happening at the same time.


Edited by toxie, 19 October 2016 - 03:31 PM.


#185 poposchmatzer

poposchmatzer

    Hobbyist

  • Members
  • PipPip
  • 45 posts
  • Location:North Rhine-Westphalia

  • Flag: Germany

  • Favorite Pinball: Williams T2

Posted 19 October 2016 - 03:36 PM

The hardware I use is a I5- 3something, GTX 780, 8MB Ram, ssd hard drive and 3 screen setup (40" 60hz HDMI and 27" DVI on GTX and 15" onbard GPU)

 

Maximum prerendered frames setting on 2 and also V-Sync setting on 2, both set in VPX.

My assessment is, it runs pretty smoothly and I can not really see any flipper lag. 

 

With my previous hardware I had problems with slight lag/ stutters until I play around with audio settings in VPX.



#186 Drybonz

Drybonz

    Really bad at pinball, but having fun.

  • Members
  • PipPipPipPip
  • 1,538 posts

  • Flag: ---------

  • Favorite Pinball: Theatre of Magic

Posted 19 October 2016 - 04:51 PM

My 46" 60Hz TV has 28ms lag, rated "great" on display input lag database. VP9, PM5 runs super fast and with apparently zero lag.

 

Not to single out your specs, Kernel, but just to put into perspective for anyone reading who is curious.

 

Input lag range for 1080/60hz TVs is about 13-30+ms range.  Many TV's on the market are above the 30ms range, and many gamers consider this range unsuitable for gaming.

 

Typical input lag range for a gaming PC monitor would be 0-8ms.  While I understand that a gaming PC monitor is not going to work for you guys that have cabs, I include this for comparison.

 

I know I have been using PC gaming examples for comparison and not everyone here is a PC gamer, but most of the discussion about input lag on the internet (and there is a whole lot of it if you are curious, it is out there, so don't take my word for it), and it is relevant.  Anyway, if I take an PC with bad specs and play Call of Duty 5 (an old game from about 2005) it may run like a dream... input is very smooth and I am racking up big kills... then, if I take the same exact PC with bad specs and play Call of Duty Bo3 (the most recent game in the series) I can't hit anything because input lag is so bad my shots aren't going where I intend them.  This is because the PC hardware itself is affecting the game.  My point is that you cannot compare VP (years old) with the current visual pinball.

 

My point is not that hardware is the end-all solution, but it is part of the puzzle, like Toxie said, above.  Also, I'm not advocating that everyone should run out and buy a new PC or monitor... but I can say that when a new cutting edge video game comes out I sometimes have to go out and buy a new video card, etc...



#187 Noah Fentz

Noah Fentz

    'Rasslin' Fan

  • VPF Administrator
  • 12,266 posts
  • Location:South Lyon, MI

  • Flag: United States of America

  • Favorite Pinball: Whitewater

  • PS3 Gamer Tag: noahfentz


Contributor

Posted 19 October 2016 - 05:30 PM

I would be curious to know how much lag is eliminated by putting the VPM DMD on the primary screen. I know it has a pretty big impact on performance when on a screen other than the primary.

Good post, Drybonz, and that may explain a lot about why there's no lag on VirtuaPins, yet there's a ton on other makers' cabs that use the cheapest possible displays. Our screens are high end commercial-grade monitors, not TVs, and there is no perceived lag.

We also use PinDMDs, eliminating the lag caused by VPM rendering the DMD on a third screen.

Not sure if any of that helps with this discussion, but maybe now it's clear why I see an issue with the rotation speed where others see lag.

Sent from my SM-G930T using Tapatalk

IdleReel.gif RumbleDMD.jpg HS2-DMD.jpg SBM.jpg ww_logo.jpg EK.jpg

 
T2.jpg Sorcerer.jpg Breakshot.jpg Firepower.jpg GorGar.jpg StarTrek.jpg


My Photobucket Resources
Whether You Believe You Can, Or You Can't, You Are Right." - Henry Ford
The future of pinball lives, it just needs to be nurtured!
If you're here to stab me in the back, you're going to have to get in line.


#188 unclewilly

unclewilly

    sofa king.....

  • VIP
  • 5,170 posts
  • Location:Baltimore, Maryland

  • Flag: United States of America

  • Favorite Pinball: tz, tom, big hurt, who dunnit



Posted 19 October 2016 - 06:29 PM

I've been trying to follow this thread.
My question is, is there a set way that authors should be adding to tables to fix this issue or are we still in discussion about this?

Asking because I'm about to udpate bad cats and if this is something people want i will add it.
Also is there a demo or example table that illustrates what i would need to add to a table to implement this

"it will all be ok in the end, if it's not ok, it's not the end"
 
Monster Bash VP10 WIP https://dl.dropboxus... (vpx)WIP15.vpx

uw2.gif


#189 sliderpoint

sliderpoint

    Pinball Fan

  • Members
  • PipPipPipPip
  • 760 posts
  • Location:Spokane, WA

  • Flag: United States of America

  • Favorite Pinball: Metallica

Posted 19 October 2016 - 06:37 PM

I think that is what this discussion is all about. What I've gathered so far is that if Vpm is slow on the solcallback it makes the flippers seem to lag. The basic suggestion is to set the key down to activate the rotatetoend on the flipper and not use the solcallback to rotate the flipper. The rest of this is trying to figure out how to deal with the consequences.

-Mike

#190 unclewilly

unclewilly

    sofa king.....

  • VIP
  • 5,170 posts
  • Location:Baltimore, Maryland

  • Flag: United States of America

  • Favorite Pinball: tz, tom, big hurt, who dunnit



Posted 19 October 2016 - 06:53 PM

So basically we are searching for a way to have the flippers flip on the key up and key down subs rather then on the solcallback, but keep them from flipping when the rom normally wouldn't allow them to flip.

Hmmmmmm, I'll have to think about this.

I don't notice the lag, as most of my vp playing is done on a fast pc monitor rather then a tv.

"it will all be ok in the end, if it's not ok, it's not the end"
 
Monster Bash VP10 WIP https://dl.dropboxus... (vpx)WIP15.vpx

uw2.gif


#191 freneticamnesic

freneticamnesic

    A Faint Ghost Through the Raindrops

  • VIP
  • 3,369 posts
  • Location:Portland, OR

  • Flag: United States of America

  • Favorite Pinball: Star Trek, Black Hole, AFM, Fast Draw, Tron, AMH

  • 360 Gamer Tag: sixgunsounddd

Posted 19 October 2016 - 07:32 PM

I don't think there's a way to do it script side right now. You can set the flipper solenoids to always be on, so you could monitor the state of the solenoid and only flip the flippers if the solenoid is enabled, but you can only do that by activating the flipper switches. From there you'd run into gameplay problems with it selecting modes or giving you instant info or things like that, and video modes wouldn't work, it would just be a mess.



#192 wrd1972

wrd1972

    Authoring Padawan

  • Platinum Supporter
  • 2,265 posts
  • Location:Central KY. USA

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 19 October 2016 - 07:41 PM

53457651.jpg

 

But seriously, glad you guys are trying to fix this.


My VP Pincab /MAME Arcade  Specs: Dell T3400 workstation with Core2 Quad core 3.0GHZ (Q9650) CPU - 8GB of RAM - Nvidia  GTX 970

40" PF Sony gaming LED TV, Dual 21" Dell monitors in the backbox - Pinscape dual boards - Full DOF - Full MAME arcade support.


#193 unclewilly

unclewilly

    sofa king.....

  • VIP
  • 5,170 posts
  • Location:Baltimore, Maryland

  • Flag: United States of America

  • Favorite Pinball: tz, tom, big hurt, who dunnit



Posted 19 October 2016 - 09:35 PM

Maybe i didn't read the thread thoroughly enough.

Where is the lag coming from or is it not determined yet.

Is it from the pinmame communication to vp. Or is it a hardware issue due to low refresh rates?

It seems to me from some responces that people with the better screens aren't experiencing the lag

If that is the case i don't see what needs fixed aside from upgrading your hardware

I don't think fixes should be made to compensate for lower end hard ware.

If it's on the pinmame side then by all means we should find a solution

"it will all be ok in the end, if it's not ok, it's not the end"
 
Monster Bash VP10 WIP https://dl.dropboxus... (vpx)WIP15.vpx

uw2.gif


#194 Drybonz

Drybonz

    Really bad at pinball, but having fun.

  • Members
  • PipPipPipPip
  • 1,538 posts

  • Flag: ---------

  • Favorite Pinball: Theatre of Magic

Posted 19 October 2016 - 10:00 PM

UW, from reading through the thread, I think it may be both.  Gtxjoe says VPM contributes up to 11-30ms lag... I personally believe that this compounded with bad hardware is giving people a bad experience.  I don't see the lag myself because I'm using a gaming computer monitor, but that doesn't help people with cabs... especially with monitors on the low end.

 

I think improvements on the software side could benefit people with cabs especially.



#195 freneticamnesic

freneticamnesic

    A Faint Ghost Through the Raindrops

  • VIP
  • 3,369 posts
  • Location:Portland, OR

  • Flag: United States of America

  • Favorite Pinball: Star Trek, Black Hole, AFM, Fast Draw, Tron, AMH

  • 360 Gamer Tag: sixgunsounddd

Posted 19 October 2016 - 10:39 PM

You're relying on smooth VPM emulation to provide split-second responses to a ball on the screen which is only limited by your video latency. When you push the flipper button in VP (on a rom controlled game), you're merely telling VPM you hit a switch, and VPM has to tell the solenoid to activate, THEN the flipper flips.



#196 nFozzy

nFozzy

    Pinball Fan

  • Members
  • PipPipPipPip
  • 553 posts

  • Flag: ---------

  • Favorite Pinball: Pinbot

Posted 20 October 2016 - 01:10 AM

Tracking changelanes is going really well :D

 

bdgzl.png


Edited by nFozzy, 20 October 2016 - 06:09 AM.


#197 jimmyfingers

jimmyfingers

    Pinball Fan

  • VIP
  • 832 posts

  • Flag: Canada

  • Favorite Pinball: Comet



Posted 20 October 2016 - 01:15 AM

Ok, so lot's of stuff going on in this topic and way too much to try and post my thoughts on / input all at once - I'm verbose as it is without trying to tackle all the things that have come up in one go ;)  I'm also going to have to try and limit myself still for time here on the forums and my general VP time as I've been having a lot of issues with pain from positions and vision aspects working on my computer and seemingly resulting in chronic neck and head ache issues, which has contributed to me stepping back from VP and these forums a fair bit.

 

Now, for a quick start and more working backwards in things discussed lately in this growing thread.  The first thing I think that is skewing some of the most recent discussion  (today's) and detracting from honing in on a more consistent understanding and perception of where lag is and is not coming from is references and comparisons to VP9 and PM5 vs. VPX.  vogliadicane and kernel have referred in their posts to, all other things being equal on their systems, that VPX is laggier than VP9 / PM5.  This is almost certainly due simply to the vast difference in performance / FPS that those earlier 2 versions could attain vs. VPX (VPX lower of course for the benefit of nice features such as 4x AA and the new built-in lighting additions), but with a caveat as to why it would differ from one person to the next depending on configuration / preferences.  

 

It is most likely that in these situations where people on the exact same setup "feel" VPX lag worse than another table in VP9 / PM5 are experiencing them while running in an open / non-vsynced configuration for all versions of the VP engines and thus FPS would be wildly different - in turn hugely affecting input lag and diminishing it.  The older versions would be producing much higher FPS.  This depends on course vsync being enable or not in VP but at least as far as VP9, vsync would not have been on because it broke the physics as the physics back then was still tied to the screen frame rate (wild flipper inaccuracies and couldn't be used).

 

This seems plausible / suspect as from kernel's previous post at least he also refers to the performance / FPS reaching 240 non-vsynced for some VPX games which seems to support this being the setting.  It's not the case as much for some / the best performing VPX tables reaching a decent 240 in that configuration but VP9 and PM5 are probably then reaching 600-1000 FPS and improving lag aspects greatly from that element with the rest of system and lag aspects indeed held constant.  Vsync setting / choice being a factor only because if it's on for PM5 and VPX then it's more apples to apples as it will be at (should be at if other things configured right) your monitor refresh.  But anyone running non-vsynced / frame capped, will indeed notice a big difference simply because of the differences between the engines.  It's a little indirect to compare the versions in general as well since one table from PM5 can't be immediately loaded (again holding as much equal as possible) into VPX and played. However, I can relay that on my Firewpower PM5 / BMPR hybrid and it's VPX counterpart with the table's kept very close in composition and physics settings (a seemingly forever WIP), on PM5 it runs at between about 900 and 1100 FPS, whereas on VPX (using 4x AA, reflections, and other eye candy lighting) it runs at about 150.  This here is the largest culprit / difference in input lag between the versions and this pretty much alone.

 

VPX is more demanding but it's also not just for the hell of it.  We just have more options, features, and lighting enhancements than before and most of use would like to use the things that are still options but make it look great even at the higher "cost" (4x AA is tough to go back from using once one has seen it).  With those same Firepower table examples (flipper settings essentially the same but one PM5 and one VPX) with 4x AA off I get about 350 FPS in VPX but I also have lots of light objects, ball reflections, and table reflections.  

 

But the point of all this isn't the options or what goes into eating FPS, it's that if you're not vsyncing or capping (and it seems there's enough out there that don't) then comparing a table on VP9 / PM5 to another table on VPX (whether the same title or not) is still comparing apples to oranges.  If would be prudent to have more information, from people discussing the comparisons between engines for input lag variation, and should accompany this general type of feedback and have actual game time frame rates as well as VP preference screen captures or accurate listings.  Plus for a proper comparison of the tables in question, we would need to be as identical as possible at least as far as flipper settings (physics values and position parameters).  Also and more general and potentially important than just the engine version comparison aspects, all discussion about variations from end uses experience with input lag as far as VPX goes should be qualified with whether they run vsynced or not (and can confirm it's actually working F11 or FRAPS as expected) as well as if they're on a T.V. or computer monitor.

 

It seems like these aspects and extra detail in general is being overlooked and potentially steering things down an incorrect logic path and confusing the issue more than clarifying it.  I'm also not trying to come down on the people who have posted this engine version comparison information, just that it's likely depicting the scene described above and therefor needs to be in the right context and / or accompanied with more details about configuration and FPS which would likely show how / why it isn't really a factor or a mystery as to why the older and newer VP engines - when FPS / vsync is not limited and performing at the max possible for that versions / table - are different for input lag.  

 

As said, there's so much more to discuss and get onto especially regarding the direct fired flippers / bypassing pinmame (ideas and existing options for that) but that will have to wait for the next post (hopefully in the next day or so).  This may not be the ideal "first post" back from me after an absence / in a while and especially regarding this overall topic category, but we're seemingly getting close to being off track here with several things and this aspect was one I felt needed raising and emphasizing.

 

Still keep ideas flowing but feedback needs to be more detailed and encompassing to draw more accurate conclusions from other people's experiences considering the wide array of configurations and options that people run.


Edited by jimmyfingers, 20 October 2016 - 01:28 AM.


#198 Ben Logan

Ben Logan

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 2,275 posts
  • Location:California

  • Flag: ---------

  • Favorite Pinball: System 11

Posted 20 October 2016 - 03:22 AM

Great to hear your initial take, jimmyfingers. Loved your work with bmpr physics, and appreciate your passion for ball and flipper physics in general. Hope your neck and head feel better soon. :)

#199 Drybonz

Drybonz

    Really bad at pinball, but having fun.

  • Members
  • PipPipPipPip
  • 1,538 posts

  • Flag: ---------

  • Favorite Pinball: Theatre of Magic

Posted 20 October 2016 - 04:19 AM

Hey Jimmyfingers... I had tried to contact you via pm a while back about some permissions for a table.  Your inbox seems to stay full... if you have a minute to send me a pm some time, I appreciate it.  I won't take up too much of your time.  Thanks.



#200 toxie

toxie

    VPF Veteran

  • VP Dev Team
  • PipPipPipPipPipPip
  • 5,734 posts
  • Location:berlin, germany

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 20 October 2016 - 07:09 AM

The problem with lag is that there are so many components involved, so each part plays a different role, depending on one's setup. So here a quick sum up again:

 

a) The flipper button/keyboard itself (minor)

b) USB polling rate (major: http://www.vpforums....howtopic=29207)

c) VP framerate to trigger the script handling (minor, but the higher the better, e.g. vsync turned off or using NVIDIAs fast sync can help a bit)

d) VP<->VPM script roundtrip (major, also depending on e and f indirectly)

e) Graphics driver (major, maximum prerendered frames tweaking can help)

f) Monitor/TV (major, use game or PC mode, and best is a 144Hz or better one, as it also influences c,d,e)

 

Plus tweaking the flipper setting in VP itself (coil ramp up 0 is fastest, then one can also tweak mass and strength, in combination with EOS Torque to avoid weird physics effects).

Maybe i didn't read the thread thoroughly enough.

Where is the lag coming from or is it not determined yet.

 

 

EDIT: JF, as for the VPX vs VP9/PM5 lag topic: i will still investigate if for example the graphics driver by default inserts more buffered frames for VPX (which people could test on their own by setting the maximum prerendered frames in the NVIDIA control panel to 1).

 

EDIT2: Apparently there is even a maximum prerendered frames control in DX9 itself, at least when using Windows Vista and up. I'll implement this into VP, for you guys to test.


Edited by toxie, 20 October 2016 - 07:33 AM.