TerryRed
Pinball Master
- Joined
- Feb 11, 2020
- Messages
- 2,166
- Solutions
- 9
- Reaction score
- 2,631
- Points
- 145
- Favorite Pinball Machine
- My Virtual Pinball Cabinet
NOTE: This is an old guide. DF1 physics are NOT the newest / most realistic physics for FP (currently that would be FizX). This guide does NOT show you how to add FizX physics to a FP table. To learn how to add FizX physics to a FP table goto this page:
********** How to add BAM DF1 physics to a Future Pinball table **********
This question comes up a lot, so I figured it was time to make a simple post to show how to add newer (simple) BAM DF1 physics to a Future Pinball table that hasn't been updated to use BAM features.
BAM allows for pretty much all aspects of FP's physics to be opened up and dynamically changed on the fly in table script!
Benefits to adding BAM DF1 physics to a Future Pinball table:
- this can help improve how well many tables will play... in particular the flippers
- flipper accuracy is improved and can be adjusted in the table script
- older BAM xml physics files are no longer required, or used (they will be ignored)
- all the new physics settings are included in the table script!
- no need for any different version of the FuturePinball.exe to change physics (only use the original FuturePinball.exe !!!)
What this guide WONT do:
- make FP tables play the same as VPX tables
- make a table play the same as using shiva flippers
- make the table play the same as the newest FizX physics
- this will make FP tables play better... but not perfect or totally realistic for everyone's preferences
Examples of some tables that will have BAM DF1 physics added already:
- TerryRed's older releases
- SLAMT1LT's Ultimate Pro tables
- table updates from GeorgeH
- table updates from Gimli
- table updates from wild
Keeping it SIMPLE
This is a basic guide that is intended to be simple and easy for most users. It is not going super in depth about the different settings for physics that you can do in the table script.
BAM is Needed!
It goes without saying that you MUST install the latest BAM from here to use these newer physics:
NOT NEEDED FOR ALL TABLES!
Note: this applies only to tables that have NOT been updated already to use BAM physics!
************* HOW IT's DONE *************
Step 1: Copy new BAM physics code into your table
Copy all the code below into your table's script under Option Explicit
Step 2: Make changes to the table editor
Save the table first!
Now you will need to make changes to the table in the editor. This is important to allow the table to match the newer physics.
I'm using Star Wars (Ultimate Pro) as an example. You can use other updated tables as well for reference.
Some of these may not need adjusting... but others will need to be based on your slope settings.
Adjust the table slope:
This will help the ball feel less floaty, and give it more weight. You will want to adjust this to your liking.
Adjust the Flippers
You can adjust the Strength and Elasticity. Note, that you will want to adjust this based on any changes you make in the Dynamic Flippers section in the table script.
Adjust the Slingshots (only if needed)
Adjust the Bumpers (only if needed)
Adjust Kickers (only if needed)
Autoplunger / Plunger
These may need adjusting to compensate for changes to slope.
Dynamic Flippers Code
- this is where you can adjust BAM dynamic flippers
- you may not need to make any adjustments
- the PARAMETERS TO TWEAK section is where you would typically make any changes
- @GeorgeH and @Gimli and @ravarcade would know how this all works much better than me
XML CODE
- this is FP's basic physics settings
- BAM used to load this from an xml file, but now we include it in the table script
- you can make changes to this section
- even though it's green and commented out, BAM will still understand it
Step 3 - Fine tune everything
- only adjust things if you feel you need to
- start with the slope adjustment for ball weight / speed preference
- adjust flippers in the editor / dynamic flipper section in the script if needed
- for many tables these are the main things that need adjusting
- then follow up with the rest as desired / needed
- you can make changes to the green xml code in the Physics Section of the table script if desired
SAVE THE TABLE, CLOSE FP and RELOAD!
- reloading the table over and over again (without closing FP) may cause it to run strangely or crash
- after making changes... SAVE the table... CLOSE FP and reload the table again to test!
Keep in mind, not all tables are the same!
Some tables will have better results than others based on how the author created it.
Some tables will need additional adjustments to geometry, or need hidden surfaces added to keep the ball under control, etc... but that is for more advanced updates!
I'm not a Physics guy!
Guys like @GeorgeH, @Gimli, and @ravarcade have a much better understanding of adjusting DF1 and xml code!
Another tutorial:
What are the chances of this happening... and on the same afternoon! I started typing this in the morning due to many requests on other groups.... and just as I posted this.... I noticed @GeorgeH posted his own tutorial for adding BAM physics to a table in the same afternoon!
Guess great minds think alike!
If you want a tutorial that explains more detail about the xml code and dynamic flippers, goto George's post here. He's more knowledgeable on the topic than I am!
===============================================================
DF1 physics are NOT the newest / most realistic physics for FP. FizX physics is now the newest most realistic physics for FP!
To learn how to add FizX physics to a FP table goto this page:
===============================================================
All In One Example Table - FizX, FLEEP, Ball Rolling, PUP SSF, DOF - Easy to add!
ALL in One Example Table and Tutorial Add FizX, FLEEP, Ball Rolling, PUP SSF, DOF to any Future Pinball table! Easy! What was once a daunting task, has now been made easy! Add the latest FizX physics, FLEEP sounds, Ball Rolling sounds, PUP SSF and DOF to any Future Pinball table quickly and...
pinballnirvana.com
********** How to add BAM DF1 physics to a Future Pinball table **********
This question comes up a lot, so I figured it was time to make a simple post to show how to add newer (simple) BAM DF1 physics to a Future Pinball table that hasn't been updated to use BAM features.
BAM allows for pretty much all aspects of FP's physics to be opened up and dynamically changed on the fly in table script!
Benefits to adding BAM DF1 physics to a Future Pinball table:
- this can help improve how well many tables will play... in particular the flippers
- flipper accuracy is improved and can be adjusted in the table script
- older BAM xml physics files are no longer required, or used (they will be ignored)
- all the new physics settings are included in the table script!
- no need for any different version of the FuturePinball.exe to change physics (only use the original FuturePinball.exe !!!)
What this guide WONT do:
- make FP tables play the same as VPX tables
- make a table play the same as using shiva flippers
- make the table play the same as the newest FizX physics
- this will make FP tables play better... but not perfect or totally realistic for everyone's preferences
Examples of some tables that will have BAM DF1 physics added already:
- TerryRed's older releases
- SLAMT1LT's Ultimate Pro tables
- table updates from GeorgeH
- table updates from Gimli
- table updates from wild
Keeping it SIMPLE
This is a basic guide that is intended to be simple and easy for most users. It is not going super in depth about the different settings for physics that you can do in the table script.
BAM is Needed!
It goes without saying that you MUST install the latest BAM from here to use these newer physics:
NOT NEEDED FOR ALL TABLES!
Note: this applies only to tables that have NOT been updated already to use BAM physics!
************* HOW IT's DONE *************
Step 1: Copy new BAM physics code into your table
Copy all the code below into your table's script under Option Explicit
Code:
xBAM.CreateAllExt 'create BAM Extension commands. This should be at the top of the script (below Option Explicit)
'###########################################################################################
'#################################### PHYSICS SETTINGS #####################################
'=============================== PHYSICS XML ===========================
'<?xml version="1.0" encoding="utf-8"?>
'<document>
' <!—Custom Physics -->
' <physics fps="296" threaded="1"></physics>
' <ball newtonDamping="0" mass="70" gravity="6000" damping="0.65"></ball>
' <flipper releaseOmega="18" rotationSpeedChart="{0.0,100.0}[0.0,100.0]" newtonDamping="1" mass="20150" omega="43" moeMethod="0"
' leftXoff="0" leftYoff="500" leftZoff="0"
' rightXoff="0" rightYoff="500" rightZoff="0"></flipper>
' <bumper impulse="90.0" impulseRandomness="0" vectorRandomness="6"></bumper>
' <autoplunger mass="20000.0" force="60000.0"></autoplunger>
' <diverter mass="10000.0" omega="33.0"></diverter>
' <gate mass="5.0" gravity="2500.0" damping="0.25"></gate>
' <kicker impulse="1200.0" vukImpulse="1400.0" impulseRandomness="2" vectorRandomness="1"></kicker>
' <plunger mass="20000.0" force="30000.0"></plunger>
' <slingshot impulse="650.0" impulseRandomness="15" vectorRandomness="3"></slingshot>
' <spindisk mass="10000.0" angularDamp="0.33" linearDamp="0.25"></spindisk>
' <spinner mass="60.0" gravity="100.0" angularDamp="0.25" angularAccel="5.25"
' spinDampLoose="0.55" spinBackLoose="1.70"
' spinDampNorm="0.75" spinBackNorm="1.80"
' spinDampTight="0.95" spinBackTight="1.90"></spinner>
' <emkicker mass="10000.0" omega="80.0"></emkicker>
' <varitarget mass="500.0" damping="0.9" tension="3.0" return="15.0"></varitarget>
' <magnet impulse="10.0" impulseRandomness="2"></magnet>
' <nudge impulse="240.0" impulseRandomness="25.0" warningLevel="350" leftAngle="60" upAngle="0" rightAngle="320"
' vectorRandomness="5" visualDistance="3" waitPeriod="300" maxBallVelocity="500.0"></nudge>
' <defaultMat softnessCoef="0.03" elasticCoef="0.1" staticFriction="0.01" kineticFriction="0.02"></defaultMat>
' <playfieldMat softnessCoef="0.02" elasticCoef="0.1" staticFriction="0.01" kineticFriction="0.02"></playfieldMat>
' <metalMat softnessCoef="0.01" elasticCoef="0.15" staticFriction="0.02" kineticFriction="0.02"></metalMat>
' <woodMat softnessCoef="0.03" elasticCoef="0.15" staticFriction="0.03" kineticFriction="0.02"></woodMat>
' <plasticMat softnessCoef="0.02" elasticCoef="0.2" staticFriction="0.02" kineticFriction="0.01"></plasticMat>
' <rubberHardMat softnessCoef="0.08" elasticCoef="0.50" staticFriction="0.04" kineticFriction="0.055"></rubberHardMat>
' <rubberIntMat softnessCoef="0.1" elasticCoef="0.72" staticFriction="0.05" kineticFriction="0.065"></rubberIntMat>
' <rubberSoftMat softnessCoef="0.12" elasticCoef="0.83" staticFriction="0.06" kineticFriction="0.075"></rubberSoftMat>
' <gateMat softnessCoef="0.05" elasticCoef="0.65" staticFriction="0" kineticFriction="0"></gateMat>
' <kickerMat softnessCoef="0.01" elasticCoef="0.05" staticFriction="0.8" kineticFriction="0.8"></kickerMat>
' <rampMat softnessCoef="0.01" elasticCoef="0.01" staticFriction="0.01" kineticFriction="0.01"></rampMat>
' <plungerMat softnessCoef="0.04" elasticCoef="0.55" staticFriction="0.02" kineticFriction="0.02"></plungerMat>
' <spindiskMat softnessCoef="0.05" elasticCoef="0.5" staticFriction="1.5" kineticFriction="2"></spindiskMat>
'</document>
'=============================== PHYSICS XML ===========================
' === Dynamic Flipper Settings ===
Const BAM_VERSION = 0
AddDebugText "BAM Version: " & BAM_VERSION
Dim RightFlipperExt,LeftFlipperExt
Dim omegaCorrectionR
Dim omegaCorrectionL
xBAM.BallSpeedLimit = 3000
Sub OnPreHitFlipperSettings(FlipperExt)
OnPreHitFlipperSettings_bounceControl(FlipperExt)
End Sub
const MaxOmega = 45 ' Omega at base of flipper. Must be > MinOmega. Default = 45
const MinOmega = 32 ' Omega at tip of flipper. Must be < MaxOmega. Default = 32
Sub LeftFlipper_prehit()
OnPreHitFlipperSettings(LeftFlipperExt)
omegaCorrectionL = MaxOmega - (LeftFlipperExt.ContactPoint * ((MaxOmega - MinOmega)/1.2))
If LeftFlipperExt.ContactPoint < 0.0 then LeftFlipperExt.Omega = MaxOmega
If LeftFlipperExt.ContactPoint > 1.2 then LeftFlipperExt.Omega = MinOmega
If (LeftFlipperExt.ContactPoint => 0.0) And (LeftFlipperExt.ContactPoint =< 1.2) then
LeftFlipperExt.Omega = omegaCorrectionL
End if
End Sub
Sub RightFlipper_prehit()
OnPreHitFlipperSettings(RightFlipperExt)
omegaCorrectionR = MaxOmega - (RightFlipperExt.ContactPoint * ((MaxOmega - MinOmega)/1.2))
If RightFlipperExt.ContactPoint < 0.0 then RightFlipperExt.Omega = MaxOmega
If RightFlipperExt.ContactPoint > 1.2 then RightFlipperExt.Omega = MinOmega
If (RightFlipperExt.ContactPoint => 0.0) And (RightFlipperExt.ContactPoint =< 1.2) then
RightFlipperExt.Omega = omegaCorrectionR
End if
End Sub
Sub OnPreHitFlipperSettings_bounceControl(FlipperExt)
' PARAMETERS TO TWEAK
const base_elasticCoef = 0.70 ' very bouncy flipper rubber
const expected_ball_speed_after_hit = 300 ' calc elasticCoef to get desired ball speed after ball hit flipper
const minimum_elasticCoef_to_scale_fast_balls = 0.15 ' we will add this to calculated elastiCoef, so ball after hit will have aditional 5% of speed before hit
const reduction_for_flipper_in_motion = 0.15 ' if flipper is not in starting point, reduce elasticCoef by 20%
If FlipperExt.Hit Then
Dim elasticCoef
Dim maxElasticCoef
Dim ballSpeed
ballSpeed = (FlipperExt.BallVSpeed + xBAM.Ball.Speed) * 0.5 ' averge speed of
maxElasticCoef = base_elasticCoef
If FlipperExt.AngleDiff > 1 Then maxElasticCoef = maxElasticCoef - reduction_for_flipper_in_motion
elasticCoef = base_elasticCoef
If ballSpeed > 1 Then elasticCoef = expected_ball_speed_after_hit / ballSpeed
elasticCoef = elasticCoef + minimum_elasticCoef_to_scale_fast_balls
If elasticCoef > maxElasticCoef Then elasticCoef = maxElasticCoef
FlipperExt.SetMaterial elasticCoef
End If
End Sub
' ========= End of Dynamic Flipper Settings ===========
'############################### END OF PHYSICS SETTINGS ###################################
'############################################################################################
Step 2: Make changes to the table editor
Save the table first!
Now you will need to make changes to the table in the editor. This is important to allow the table to match the newer physics.
I'm using Star Wars (Ultimate Pro) as an example. You can use other updated tables as well for reference.
Some of these may not need adjusting... but others will need to be based on your slope settings.
Adjust the table slope:
This will help the ball feel less floaty, and give it more weight. You will want to adjust this to your liking.
Adjust the Flippers
You can adjust the Strength and Elasticity. Note, that you will want to adjust this based on any changes you make in the Dynamic Flippers section in the table script.
Adjust the Slingshots (only if needed)
Adjust the Bumpers (only if needed)
Adjust Kickers (only if needed)
Autoplunger / Plunger
These may need adjusting to compensate for changes to slope.
Dynamic Flippers Code
- this is where you can adjust BAM dynamic flippers
- you may not need to make any adjustments
- the PARAMETERS TO TWEAK section is where you would typically make any changes
- @GeorgeH and @Gimli and @ravarcade would know how this all works much better than me
XML CODE
- this is FP's basic physics settings
- BAM used to load this from an xml file, but now we include it in the table script
- you can make changes to this section
- even though it's green and commented out, BAM will still understand it
Step 3 - Fine tune everything
- only adjust things if you feel you need to
- start with the slope adjustment for ball weight / speed preference
- adjust flippers in the editor / dynamic flipper section in the script if needed
- for many tables these are the main things that need adjusting
- then follow up with the rest as desired / needed
- you can make changes to the green xml code in the Physics Section of the table script if desired
SAVE THE TABLE, CLOSE FP and RELOAD!
- reloading the table over and over again (without closing FP) may cause it to run strangely or crash
- after making changes... SAVE the table... CLOSE FP and reload the table again to test!
Keep in mind, not all tables are the same!
Some tables will have better results than others based on how the author created it.
Some tables will need additional adjustments to geometry, or need hidden surfaces added to keep the ball under control, etc... but that is for more advanced updates!
I'm not a Physics guy!
Guys like @GeorgeH, @Gimli, and @ravarcade have a much better understanding of adjusting DF1 and xml code!
Another tutorial:
What are the chances of this happening... and on the same afternoon! I started typing this in the morning due to many requests on other groups.... and just as I posted this.... I noticed @GeorgeH posted his own tutorial for adding BAM physics to a table in the same afternoon!
Guess great minds think alike!
If you want a tutorial that explains more detail about the xml code and dynamic flippers, goto George's post here. He's more knowledgeable on the topic than I am!
Tutorial - Physics/XML - A Simple Way to Add Physics to Any Future Pinball (FP) Table with Original Physics
This tutorial can still be used although there is a new tutorial for FizX Lite Edition that you should consider using that is available here. It does require a little more work to add to your table. Note: This tutorial requires that you have Better Arcade Mode (BAM) installed. I wrote...
pinballnirvana.com
===============================================================
DF1 physics are NOT the newest / most realistic physics for FP. FizX physics is now the newest most realistic physics for FP!
To learn how to add FizX physics to a FP table goto this page:
All In One Example Table - FizX, FLEEP, Ball Rolling, PUP SSF, DOF - Easy to add!
ALL in One Example Table and Tutorial Add FizX, FLEEP, Ball Rolling, PUP SSF, DOF to any Future Pinball table! Easy! What was once a daunting task, has now been made easy! Add the latest FizX physics, FLEEP sounds, Ball Rolling sounds, PUP SSF and DOF to any Future Pinball table quickly and...
pinballnirvana.com
===============================================================
Attachments
Last edited: