***** UPDATED 10/31/2020 *****

VPX physics have come a long way in the past few years.  Authors have been optimizing settings and have produced amazing results using different methods.  I personally have been very happy with a wide variety of physics by different authors and often study what different authors are doing.  As a result of those studies, I’ve found nFozzy’s physics to be the closest to real pinball.  He’s done some pretty amazing work that extends the physics capabilities of VPX!  This tutorial is an introduction on how to add nFozzy’s flipper physics to a table.

Flipper Physics

A couple of years ago I released a flipper trajectory testing table.  It allowed the user to adjust flipper settings and visualize the ball trajectories and velocities when flipping at various locations along the length of the flipper.  What I found was that a number of shots didn’t have appropriate trajectories or velocities compared to real flippers.  For example, backhands were too vertical and the velocities were too low.  In addition, trajectories tended to group at various locations along the length of the flipper.  The middle third of the flipper often had tightly grouped trajectories that made certain shots either super easy or super difficult.

nFozzy took what I did to an entirely different level.  He built in the ability to test VPX flippers and compare them directly to real flipper performance.  He then developed scripting that allowed him to “adjust” the profile of the flipper trajectories and velocities to more closely match those of a real flipper.

Implementing nFozzy’s Solution

There are several steps for taking advantage of nFozzy’s flipper solution.  At a high level we’ll need the following:

  1. flippers with specific physics settings
  2. custom triggers for each flipper
  3. an object or point to tell the script where the tip of the flipper is at rest
  4. and, special scripting

The following settings are a solid starting point for various eras of pinballs.

Flipper Physics (assumes a ball mass of 1 and diameter of 50)

EM’s late 70’s to mid 80’s mid 80’s to early 90’s

mid 90’s and later

Mass 1 1 1 1
Strength 500-1000 (750) 1400-1600 (1500) 2000-2600 3200-3300 (3250)
Elasticity 0.88 0.88 0.88 0.88
Elasticity Falloff 0.15 0.15 0.15 0.15
Fricition 0.8-0.9 0.9 0.9 0.9
Return Strength 0.11 0.09 0.07 0.055
Coil Ramp Up 2.5 2.5 2.5 2.5
Scatter Angle 0 0 0 0
EOS Torque 0.3* 0.3* 0.275* 0.275*
EOS Torque Angle 4 4 6 6

* requires special scripting to prevent a “springy” flipper when the flipper is held in the up position (covered below)

A common mistake I see on many tables is incorrect flipper length.  A 3-inch flipper with rubbers will be about 3.125 inches long.  This translates to about 147 vp units.  Therefore, the flipper start radius + the flipper length + the flipper end radius should equal approximately 147 vp units.

Flipper Polarity and Velocity Correction

I find that flipper polarity and velocity correction is not needed on EM tables.  I only use them for late 70’s and later machines (solid state).  I also would not use polarity and velocity correction for short (2-inch) or vertical flippers (like the upper flipper on Dr. Who or Jurassic Park).

Flipper Triggers and Flipper End Points

For each flipper that we’ll apply polarity and velocity correction we’ll add a trigger to the table using the trigger shape “TriggerNone”.  For example, one for the left flipper (TriggerLF) and one for the right flipper (TriggerRF).  The image below shows the approximate shape of the triggers.  Essentially, they should surround the shape of the flippers from start angle to end angle.  I recommend the trigger be 23 vp units larger than the flipper objects (no larger and no smaller).  I’ve used a 23 x 23 wall in the image below to help me properly size the triggers.  Set the hit height of the triggers to 150.

Also add end points for each flipper.  Use a standard primitive with 30 sides and an XSize and YSize of 2 times the end radius of the flippers.  Place them a closely as possible to end of the flippers and name them “EndPointLp” for the left flipper and “EndPointRp” for the right flipper.  Make sure they are not visible and are not collidable.

Scripting

Select and add a trajectory and velocity profile for the table you’re updating.

Flipper Correction Initialization late 70s to early 80s
Flipper Correction Initialization mid 80s
Flipper Correction Initialization late 80s to early 90s
Flipper Correction Initialization early 90s and after

Note, you may need to update the following lines if you’re applying trajectory correction to more than two flippers or are using different names for your flippers, endpoints or trigger objects.

dim LF : Set LF = New FlipperPolarity
dim RF : Set RF = New FlipperPolarity

dim x, a : a = Array(LF, RF)

LF.Object = LeftFlipper
LF.EndPoint = EndPointLp
RF.Object = RightFlipper
RF.EndPoint = EndPointRp

Sub TriggerLF_Hit() : LF.Addball activeball : End Sub
Sub TriggerLF_UnHit() : LF.PolarityCorrect activeball : End Sub
Sub TriggerRF_Hit() : RF.Addball activeball : End Sub
Sub TriggerRF_UnHit() : RF.PolarityCorrect activeball : End Sub

Next we’ll need to replace the flipper.rotatetoend statements with the following (typically in the SolLFlipper and SolRFlipper subs):

LF.fire ‘LeftFlipper.RotateToEnd
RF.fire ‘RightFlipper.RotateToEnd

Finally, download and include the necessary supporting functions in your table script.

Flipper Correction Functions

Similar to above, you may need to modify the following line in the AddPt Sub if you’re applying correction to more than two flippers.

dim a : a = Array(LF, RF)

If you have completed the above steps correctly, your flippers should now have polarity and velocity correction enabled.

Flipper Tricks

Next, we need to add code to enable flipper tricks physics.  This code addresses deficiencies in the VP flipper physics to prevent a “springy flipper” when the flipper is held in the up position, enhances the coil ramp up curves allowing for drop catches and tap passes, simulates the absorption of ball momentum (allowing for live catches), and corrects some buggy behavior in the flipper code that at times causes weird bouncing behavior.

Add the following script to your table. Note this uses the right flipper timer in case you’re using for some other purpose.

Flipper Tricks Physics Code

Once again, you may need to modify the following lines if you’re applying this code to more than two flippers.

sub RightFlipper_timer()
     FlipperTricks LeftFlipper, LFPress, LFCount, LFEndAngle, LFState
     FlipperTricks RightFlipper, RFPress, RFCount, RFEndAngle, RFState
end sub

dim LFPress, RFPress, LFCount, RFCount
dim LFState, RFState
dim RFEndAngle, LFEndAngle

LFEndAngle = Leftflipper.endangle
RFEndAngle = RightFlipper.endangle

You will also want to modify the EOSTnew and EOSReturn Consts based on the era of table.

  • EOSTNew
    • “1” for EM’s to late 80’s
    • “0.8” for 90’s and after
  • EOSReturn
    • “0.055” for EM’s
    • “0.045” late 70’s to mid 80’s
    • “0.035” mid 80’s to early 90’s
    • “0.025” mid 90’s and after

Finally, we need to add the following to the KeyDown and KeyUp subs:

Keydown sub:

If keycode = LeftFlipperKey Then FlipperActivate LeftFlipper, LFPress
If keycode = RightFlipperKey Then FlipperActivate RightFlipper, RFPress

Keyup sub:

If keycode = LeftFlipperKey Then FlipperDeActivate LeftFlipper, LFPress
If keycode = RightFlipperKey Then FlipperDeActivate RightFlipper, RFPress

Please note that geometry can be very important when designing a table for flipper tricks.  For example, the position of lane guides in relation to the flipper can have significant impacts on the ability to post pass.  If the lane guides are too high, the ball may deflect of the guide preventing if from achieving the necessary trajectory.

Attached is an example table that applies these techniques to the flippers.

Star Trek (Bally 1979) v1.5.2

16 Comments
  1. randr 1 year ago

    Amazing work as always roth. Thanks for all your contributions you have done to vp!

  2. Author
    rothbauerw 1 year ago

    @nFozzy deserves all the credit.

  3. Herweh 1 year ago

    Awesome stuff, nFozzy. Will try to add this pretty soon.
    And thank you so much, roth, for your perfect explanation, for summarizing all and for more upcoming physics infos. I love all you‘re doing for the community.

  4. bord 1 year ago

    Really excited for this how-to. Can’t wait to implement it and read part 2. Thanks, @rothbauerw and @nfozzy!

  5. Thalamus 1 year ago

    I know you on several occasions already has mentioned nFozzy’ flipper physics. And I’ve looked and came to the conclusion that it was something to revisit for the future as I had hard time following what was actually being done. With this article, I feel I’m still able to understand the why’s and how’s. So thank you very much Roth for taking your time to explain it to us in more detail.

  6. bord 1 year ago

    Any changes needed if there is an upper left or right flipper?

  7. Author
    rothbauerw 1 year ago

    I’m not aware that this has been tried on upper flippers. I can’t think of a reason it wouldn’t work, but it might need a different profile. We’ll have to experiment with it and I can add it to the tutorial once we figure it out.

  8. Ben Logan2 1 year ago

    Awesome stuff, nfozzy. Your contributions to the community have been amazing.

  9. wrd1972 1 year ago

    Roth,
    I’m trying to add this to BBBB. I think I have everything in. But when I start the table, I am getting script error “Variable is undefined “addpoint”.

    Any idea what I am missing?

  10. batch 6 months ago

    Thanks for this topic

    I’m gonna try to use it for my table “Nemesis (Peyper)”

    Do I have to add this flippers scripting to the script and keep the old one,

    or delete all the old informations about flippers in the script

  11. tomate 4 months ago

    This is great, I’m gonna try in some tables.
    Stupid question: on tables with more than two flippers, we simply copy and paste the triggers and the end point on the other flippers, keeping the same name?

  12. Tom 3 weeks ago

    the Flipper Correction Functions link is broken

  13. Tom 3 weeks ago

    awesome, thanks. When i can pass a ball from tip to tip, you know you have this stuff dialed in. thanks for all you do

Leave a reply

©2020 VPinBall.com

Log in with your credentials

or    

Forgot your details?

Create Account

The Vpinball app

FREE
VIEW