Jump to content



Photo
* * * * * 1 votes

Potential Flipper Lag Improvement Idea


  • Please log in to reply
357 replies to this topic

#281 Ben Logan

Ben Logan

    Pinball Wizard

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

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

  • Favorite Pinball: System 11

Posted 26 October 2016 - 06:18 AM

Pretty inspiring findings!

#282 fuzzel

fuzzel

    spaghetti code

  • VP Dev Team
  • PipPipPipPipPip
  • 2,818 posts

  • Flag: Germany

  • Favorite Pinball: yes I have

Posted 26 October 2016 - 06:26 AM

FYI: a new build is available with Toxie's latest changes (http://www.vpforums....=35311&p=350690)



#283 BananaBoat

BananaBoat

    Enthusiast

  • Members
  • PipPipPip
  • 228 posts

  • Flag: Australia

  • Favorite Pinball: Tron LE

Posted 26 October 2016 - 06:58 AM

Before i go install the latest beta how do i accurately measure the actual flipper delay so that i can compare before and after?

Sent from my SM-G935F using Tapatalk

#284 toxie

toxie

    VPF Veteran

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

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 26 October 2016 - 07:03 AM

There are so many components involved that its hard to generalize.

 

My 'fix' you can measure with the table from http://www.vpforums....=36111&p=360947

 

Then there is the no-VPM flipper workaround from http://www.vpforums....=36111&p=359485 and you can meaure it there by also adding some Timer() calls to measure the difference

 

For the rest (USB driver, GFX driver, etc) one would have to install some pretty confusing profiling tools.



#285 BananaBoat

BananaBoat

    Enthusiast

  • Members
  • PipPipPip
  • 228 posts

  • Flag: Australia

  • Favorite Pinball: Tron LE

Posted 26 October 2016 - 07:04 AM

Ok so ill start with your fix and revert with results

Sent from my SM-G935F using Tapatalk

#286 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 26 October 2016 - 12:40 PM

Ok so I'm still following along. Haven't had time to test due to my 4 year old son.
Is there a concensus as to which code we should use in our vpm tables to give the best end user experience.
Just asking because i have a bad cats update and soon will have a pinball magic release that i would like to add the code to.
But I've been waiting for a solid solution first on this issue

"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


#287 toxie

toxie

    VPF Veteran

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

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 26 October 2016 - 01:47 PM

From my understanding:

 

For every machine that has some kind of tilt solenoid or similar, use the de-coupled VP flippers, e.g. no roundtrip VP<->VPM, but directly wired to the key input,

see here for the machines: http://www.vpforums....=36111&p=360623

and here for the code: http://www.vpforums....=36111&p=360658

and use the solenoid to en/disable the VP flippers.

 

If this is not the case for the machine in question, then there is a reasonably simple workaround to disable the VP-flippers (with some minor caveats)

by Knorr here: http://www.vpforums....=36111&p=360571



#288 BananaBoat

BananaBoat

    Enthusiast

  • Members
  • PipPipPip
  • 228 posts

  • Flag: Australia

  • Favorite Pinball: Tron LE

Posted 27 October 2016 - 10:18 AM

For my understanding is the latest rev supposed to solve the flipper delay for existing tables?

I tried the test table and it is a vast improvement with anywhere between 4ms to 12ms lag times.
Existing tables still display the cronic flipper lag..

Sent from my SM-G935F using Tapatalk

#289 toxie

toxie

    VPF Veteran

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

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 27 October 2016 - 10:30 AM

its not a general fix. it just fixes one component of all these separate issues mentioned in here.



#290 wrd1972

wrd1972

    Authoring Padawan

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

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 27 October 2016 - 05:50 PM

Is my thinking here correct?

If a visible VP flipper is used. There is not a lag issue that impacts gameplay.

But if a prim overlay is used. Then there is a lag that impacts gameplay.

 

Is that correct?


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.


#291 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,151 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 27 October 2016 - 05:58 PM

I would think with a prim overlay, the ball will still shoot the same.  The VP flipper whether its visible or invisible is what hits the ball.

 

The prim overlay visually may look laggy if the timer used to rotate the primitive is too slow (toxie suggested 8ms timer interval, i believe)



#292 wrd1972

wrd1972

    Authoring Padawan

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

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 27 October 2016 - 06:23 PM

I would think with a prim overlay, the ball will still shoot the same.  The VP flipper whether its visible or invisible is what hits the ball.

 

The prim overlay visually may look laggy if the timer used to rotate the primitive is too slow (toxie suggested 8ms timer interval, i believe)

I cant seem to find the timer your speaking to. Can you point me in the direction?


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.


#293 toxie

toxie

    VPF Veteran

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

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 27 October 2016 - 08:05 PM

Here: http://www.vpforums....=36111&p=361036

This is about the timer that polls the invisible VP flipper to sync with the visible primitive flipper.



#294 toxie

toxie

    VPF Veteran

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

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 03 November 2016 - 11:45 PM

Some updates on the topic:

 

First of all, the lag test table posted in here is flawed in its design, as it actually counts the timer updates to measure time, which is not the actual 'real' time though.

One must use the official VBS Timer function, which again has the problem that it only has a resolution of 1/64th second (although on my machine thats not always true it seems, and the resolution is more fine grained).

 

Then i had a stab at all the timer/physics update code again, which should again improve things a bit.



#295 Ben Logan

Ben Logan

    Pinball Wizard

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

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

  • Favorite Pinball: System 11

Posted 03 November 2016 - 11:46 PM

Thanks so much for your attention to flipper latency, Toxie. Really appreciate it! :D 



#296 Slydog43

Slydog43

    Pinball Wizard

  • Platinum Supporter
  • 3,008 posts
  • Location:Hackettstown, NJ

  • Flag: United States of America

  • Favorite Pinball: Addams Family, All Williams 90's Games

Posted 04 November 2016 - 03:28 AM

WOW, that sounds like your going to continue improving things (as always I guess).  VP Devs ROCK!!!  Toxie can you come up with a better test table?



#297 toxie

toxie

    VPF Veteran

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

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 04 November 2016 - 07:09 AM

I also just added a more stable time function to the script functions: SystemTime()

That way one can get a real millisecond precision time.

This one can then be used to measure the difference between things.



#298 flupper1

flupper1

    Enthusiast

  • Members
  • PipPipPip
  • 464 posts
  • Location:Netherlands

  • Flag: Netherlands

  • Favorite Pinball: Visual Pinball

Contributor

Posted 04 November 2016 - 07:11 AM

Thanks Toxie! And I did try to use the real timer, which gave me the result you are referring (low res timing). I even thought up a way of measuring total lag using lego mindstorms stuff from my son:

- a lego switch which you push in parallel to the flipper button

- a color sensor which is pointed at the end spot of the uprotated flipper (so the sensor notices what happens at the of the render pipeline, including tv screen lag), with a bright flipper and black background

- the mindstorms computer with a simple program to measure time

However:

I found that the maximum resolution of the mindstorms timer is 1/100ms, so only rough measurements. And second: I do not know if the color sensor has timing issues. So I only did this experiment in my mind...



#299 fuzzel

fuzzel

    spaghetti code

  • VP Dev Team
  • PipPipPipPipPip
  • 2,818 posts

  • Flag: Germany

  • Favorite Pinball: yes I have

Posted 04 November 2016 - 07:13 AM

A new beta build is available for testing ;)



#300 toxie

toxie

    VPF Veteran

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

  • Flag: Germany

  • Favorite Pinball: AFM

Posted 04 November 2016 - 08:52 AM

And i just added another tweak: The PinMAME timer is now triggered in sync with the FPS that one can reach (actually multiple times per frame update (currently 4x)).

 

So if in addition DJRobX can pull off some more magic on the VPM side, then at least this component will be close-to-optimal then.