VPX physics have come a long way in the past two 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 physics to a table.
nFozzy’s Terminator 2 and Space Station are great example tables of what his physics can do and how he’s implemented some of the methods I will walk through. I encourage you to dig into these tables if you’re interested in what he’s doing.
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. Playing either Terminator 2 or Space Station and you’ll quickly feel the difference and more even distribution of shots along the length of the flippers.
Implementing nFozzy’s Solution
There are several steps for taking advantage of nFozzy’s flipper solution. At a high level we’ll need flippers with specific physics settings, custom triggers for each flipper, an object or point to tell the script where the tip of the flipper is at rest, and some scripting.
In my opinion, his settings for Space Station are a solid starting point for early solid state pinballs through the late 80’s and his settings for Terminator 2 should be a solid starting point for 90’s pinballs.
Flipper Physics (assumes a ball mass of 1 and diameter of 50)
(early SS to late 80’s)
|Coil Ramp Up||0||0|
|EOS Torque Angle||6||6|
Flipper Triggers and Flipper End Points
We’ll add two triggers to the table using the trigger shape “TriggerNone”. 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.
For the end points, 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.
First, download and include the necessary supporting functions in your table script.
Second, create two new objects using the FlipperPolarity Class.
dim LF : Set LF = New FlipperPolarity ‘Left Flipper
dim RF : Set RF = New FlipperPolarity ‘Right Flipper
Third, configure the profile to adjust trajectory (polarity) and velocity. Note that the name of the left flipper and right flipper are assigned to the corresponding objects and the end point primitives we created in a previous step are assigned. The example below corresponds to the flipper profile for Terminator 2 (90’s and beyond pinballs).
dim x, a : a = Array(LF, RF)
for each x in a
‘safety coefficient (diminishes polarity correction only)
x.AddPoint “Ycoef”, 0, RightFlipper.Y-65, 1
x.AddPoint “Ycoef”, 1, RightFlipper.Y-11, 1
x.enabled = True
x.TimeDelay = 44
‘ “Velocity” profile
addpt “Velocity”, 0, 0, 1
addpt “Velocity”, 1, 0.2, 1.07
addpt “Velocity”, 2, 0.41, 1.05
addpt “Velocity”, 3, 0.44, 1
addpt “Velocity”, 4, 0.65, 1.0’0.982
addpt “Velocity”, 5, 0.702, 0.968
addpt “Velocity”, 6, 0.95, 0.968
addpt “Velocity”, 7, 1.03, 0.945
‘ “Polarity” profile
AddPt “Polarity”, 0, 0, 0
AddPt “Polarity”, 1, 0.16, -4.7
AddPt “Polarity”, 2, 0.33, -5
AddPt “Polarity”, 3, 0.37, -4.7 ‘4.2
AddPt “Polarity”, 4, 0.41, -5.3
AddPt “Polarity”, 5, 0.45, -5 ‘4.2
AddPt “Polarity”, 6, 0.576,-4.7
AddPt “Polarity”, 7, 0.66, -2.8’-2.1896
AddPt “Polarity”, 8, 0.743, -1.5
AddPt “Polarity”, 9, 0.81, -1.5
AddPt “Polarity”, 10, 0.88, 0
LF.Object = LeftFlipper
LF.EndPoint = EndPointLp ‘you can use just a coordinate, or an object with a .x property.
RF.Object = RightFlipper
RF.EndPoint = EndPointRp
Forth, add hit and unhit subs for the flipper triggers.
‘Trigger Hit – .AddBall activeball
‘Trigger UnHit – .PolarityCorrect activeball
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
Finally, we need to replace the flipper.rotatetoend statements with the following (typically in the SolLFlipper and SolRFlipper subs):
The script for steps 2-4 are included here for both early SS to late 80’s and 90’s and beyond tables. I recommend not changing the profiles unless you really know what you’re doing.
If you have completed the above steps correctly, your flippers should now have polarity and velocity correction enabled. Attached is an example table that uses the steps above to implement nFozzy’s flipper physics for early SS to late 80’s settings.