Future Pinball – Getting up to date and Physics ???

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #90778
    Gilrock
    Participant
      @gilrock
      Member

      I installed Future Pinball from scratch today and got several tables up and running…mostly SLAM tables posted by Terry.  So that got me interested in bringing my FP table I published in 2013 up to date.  I was one of the early ones to incorporate LedWiz support into an FP table.  I inspected how Terry was doing the DOFLinx scripting and it was fairly easy to update my table since all I had to do was search for all the instances of the my bLedWizSupport variable and replace the LedWiz code with DOFLinx code.  I just tested it and its already fairly good.  There was some flasher stuff that didn’t work quite like I had guessed so I’ll have to try to find documentation for the DOFLinx commands.

      I’m also not very good with all the various physics options in FP.  I designed the table right before BAM became a thing so it plays but I notice the flippers and slingshots aren’t quite strong enough.  Any guidance for what I should be doing in the physics area to be current with what everyone likes to use?  I notice all of Terry’s table have the XML file.  I don’t fully understand how that all works.  Do I just grab for instance a copy of the 2.7 physics XML and then rename it to my table name and then just alter the settings in my table till I like them and then provide both files to users?  Or do I have to be modifying anything in the XML itself?

      I attached a photo showing my FP version next to the real table.  After I do this I’ll try to do the harder task of updating my VP version to VPX.

       

       

      Attachments:
      #90858
      Gilrock
      Participant
        @gilrock
        Member

        This is the problem with Future Pinball.  I found several posts on gopinball with people asking how to update their table physics and nobody replies.  All the help seems to be geared towards how to use the various physics files.

        I tried SLAMT1LT’s 2.7 exe with my table and it was fairly good but now my flippers are too strong.  Not sure how to fix this for others since not everyone will use his EXE.  I guess that means I need to pick an XML file but I’m not sure if I still tweak settings inside the table or is everything done external in the XML now?

        The other problem I notice between the FP version and my real table is the ball does not roll across the banana flipper properly.  It feels like it sticks too much.  It almost never has a chance to roll off the end of the flipper like it will on the real table.  Need to figure out if I can improve that.

         

        #90871
        TerryRed
        Moderator
          @terryred
          MemberContributorModerator

          This is the problem with Future Pinball. I found several posts on gopinball with people asking how to update their table physics and nobody replies. All the help seems to be geared towards how to use the various physics files.

          I tried SLAMT1LT’s 2.7 exe with my table and it was fairly good but now my flippers are too strong. Not sure how to fix this for others since not everyone will use his EXE. I guess that means I need to pick an XML file but I’m not sure if I still tweak settings inside the table or is everything done external in the XML now?

          The other problem I notice between the FP version and my real table is the ball does not roll across the banana flipper properly. It feels like it sticks too much. It almost never has a chance to roll off the end of the flipper like it will on the real table. Need to figure out if I can improve that.

          As for how BAM works with XML files:

          • yes, you simply make a copy of whatever version of the physics XML file (2.5,2.6,2.7,etc) you want to use.
          • simply put the xml where your table file is and rename the XML file the same as the table file.
          • BAM will automatically load and use the matching XML file for physics
          • It doesn’t matter what version of Future Pinball.EXE you use, it will be the XML that determines the physics.
          • Myself, I use the SLAMT1LT 2.7 exe with no watermark, and I have the correct XML (to match what the table was originally intended for) for every table.
          • DO NOT use the Zed 64bit Future Pinball EXE (its just a patched version of the EXE). While it seems to work nicely for desktop use….it causes issues with DOFLinx and Future DMD.
          • newest BAM (and upcoming versions) apparently will give you much more control over the physics in the table script itself.
          • GeorgeH, ravarcade, SLAMT1LT would be the best people to consult about changing physics. It’s not like the old days… you can do much more with the physics now
          • don’t ask me how to edit physics…I have no idea.  :)
          #90939
          shiva
          Participant
            @shiva
            Member

            BAM is rapidly changing, but the one thing you should be doing is the physics within the script, and not a external xml file. There are far more features and capabilities by using the physics directly in the script, like the variable speed of the flippers,  and the new dynamic settings.

            I’ve been working on flipper physics for my newest game, and posted what I have so far up at gopinball, while we are waiting for the next round of BAM updates. Slam’s 2.7 problems mentioned here are most likely friction settings. I am posting a copy of my present settings for all of BAM, also including the code for the newest version of my flipper mod, as well as other things like the base for a active ball system that I use to adjust flipper omega. You need the next version of BAM (should be out real soon) as I have a beta copy of the dll.

            These settings are for Bally Solid State tables. From what I have been getting back from Gimli they seem to work fine with Williams as well after some adjustments

            A brief primer…

            – The xml is added in the script. The Friction settings are very low as there will be more changes to the physics in BAM, so getting ready for that
            – The second is my custom coding for dynamic flippers. These look at the speed of the ball, and adjust the strength (omega) of the flipper according. you will see this in other games before mine, like Creature and Monster Bash.
            – Blues flipper mod part 3. My custom mod to compensate for angles, power at the base of the flipper etc and collision/”slippery” flippers. You don’t need this, it’s there anyway and soon BAM will be replacing these things with it’s own coding, like being able to adjust the angle of the ball right in the script itself.
            – AddKeyEvent- You can add any values in here directly to the keypress and keyreleased subs, it’s just the way I do things and don’t have to jump all over 5000 lines of code trying to find it.

            Yeah, there’s a lot now. Once we get the hang of this, I will get in touch with several authors and see if we can rewrite the code so it’s a copy and paste, like some of the vpx routines that everyone uses now.

            ‘ *********************************************************************
            ‘ ** **
            ‘ ** BAM Special Coding Routines **
            ‘ ** **
            ‘ *********************************************************************

            ‘ xBAM.FixScore ‘ fix score un limited,in FP limit 9999999999

            ‘ ‘ ——————— Physics Default Values ——————————-

            ‘<?xml version=”1.0″ encoding=”utf-8″?>
            ‘<document>
            ‘ <!– Custom Physics for Jungle Girl –>
            ‘ <physics slope=”5.5″ fps=”296″ threaded=”1″></physics>
            ‘ <!– Settings for various objects –>
            ‘ <ball newtonDamping=”0″ mass=”66″ gravity=”5250″ damping=”0.1″></ball>
            ‘ <flipper rotationSpeedChart=”{0.0,15.0},{2.0,28.0},{4.0,55.0},{6.0,70.0},{8.0,77.0},{10.0,79.0},{12.0,79.0},{14.0,77.0},{16.0,73.0},{50.0,30.0}” newtonDamping=”0.01″ mass=”8500″ omega=”47″ damping=”0.001″ moeMethod=”0″
            ‘ leftXoff=”0″ leftYoff=”1900″ leftZoff=”2″
            ‘ rightXoff=”0″ rightYoff=”1900″ rightZoff=”0″></flipper>
            ‘ <bumper impulse=”80.0″ impulseRandomness=”.1″ vectorRandomness=”2″></bumper>
            ‘ <autoplunger mass=”20000.0″ force=”60000.0″></autoplunger>
            ‘ <diverter mass=”10000.0″ omega=”28.0″></diverter>
            ‘ <!– GATE: Mass controls force of gate: Damping fixes error with ball stuck on gate. Between .25 and 3. A higher value will cause ball to be stuck –>
            ‘ <gate mass=”.1″ gravity=”500.0″ damping=”.25″></gate>
            ‘ <kicker impulse=”650.0″ vukImpulse=”1400.0″ impulseRandomness=”10″ vectorRandomness=”10″></kicker>
            ‘ <plunger mass=”25000.0″ force=”38000.0″></plunger>
            ‘ <slingshot impulse=”575.0″ impulseRandomness=”10″ vectorRandomness=”5″></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 Settings –>
            ‘ <nudge impulse=”120.0″ impulseRandomness=”25.0″ warningLevel=”250″ leftAngle=”60″ upAngle=”0″ rightAngle=”320″
            ‘ vectorRandomness=”5″ visualDistance=”1″ waitPeriod=”300″ maxBallVelocity=”500.0″></nudge>
            ‘ <!– Materials Settings –>
            ‘ <defaultMat softnessCoef=”0.02″ elasticCoef=”0.1″ staticFriction=”0.02″ kineticFriction=”0.02″></defaultMat>
            ‘ <!– Material Settings for surfaces marked as playfields –>
            ‘ <playfieldMat softnessCoef=”0.03″ elasticCoef=”0.1″ staticFriction=”.25″ kineticFriction=”0.15″></playfieldMat>
            ‘ <!– Primary Material Types –>
            ‘ <metalMat softnessCoef=”0.02″ elasticCoef=”0.3″ staticFriction=”0.02″ kineticFriction=”0.01″></metalMat>
            ‘ <plasticMat softnessCoef=”.02″ elasticCoef=”0.2″ staticFriction=”0.05″ kineticFriction=”0.04″></plasticMat>
            ‘ <woodMat softnessCoef=”0.03″ elasticCoef=”0.4″ staticFriction=”0.03″ kineticFriction=”0.03″></woodMat>
            ‘ <rubberHardMat softnessCoef=”0.125″ elasticCoef=”0.5″ staticFriction=”0.03″ kineticFriction=”0.03″></rubberHardMat>
            ‘ <rubberIntMat softnessCoef=”0.1″ elasticCoef=”1.25″ staticFriction=”0.02″ kineticFriction=”0.01″></rubberIntMat>
            ‘ <rubberSoftMat softnessCoef=”0.15″ elasticCoef=”0.75″ staticFriction=”0.04″ kineticFriction=”0.01″></rubberSoftMat>
            ‘ <!– Object Specific Material Settings –>
            ‘ <gateMat softnessCoef=”0.05″ elasticCoef=”0.5″ 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.5″ staticFriction=”0.02″ kineticFriction=”0.02″></plungerMat>
            ‘ <spindiskMat softnessCoef=”0.05″ elasticCoef=”0.5″ staticFriction=”1.5″ kineticFriction=”2″></spindiskMat>
            ‘</document>

            ‘ ——————— Dynamic Flippers Physics ——————————-

            Dim RightFlipper2Ext, LFExt, RFExt,RightFlipperExt,LeftFlipperExt ‘ Needed for BAM
            Dim xRightFlipperOmega,xLeftFlipperOmega,xLFOmega,xRFOmega,xRightFlipper2Omega ‘ swapable Omega values for Flippers
            Dim xRightFlipperMass,xLeftFlipperMass,xLFMass,xRFMass,xRightFlipper2Mass ‘ swapable Mass values for Flippers
            Dim RadToDeg ‘ something to do with ball angles
            Dim prehitidx ‘ No idea what this does either
            Set RightFlipperExt = xBAM.Flipper(“RightFlipper”)
            Set LeftFlipperExt = xBAM.Flipper(“LeftFlipper”)
            Set RightFlipper2Ext = xBAM.Flipper(“RightFlipper2”)
            Set LFExt = xBAM.Flipper(“LF”)
            Set RFExt = xBAM.Flipper(“RF”)

            ‘ Define initial base values as default settings
            xRightFlipperOmega=46:xRightFlipperMass=5400
            xLeftFlipperOmega=46:xLeftFlipperMass=5400
            xLFOmega=46:xLFMass=4000
            xRFOmega=46:xRFMass=4000
            xRightFlipper2Omega=46:xRightFlipper2Mass=5400

            RightFlipperExt.Mass = (xRightFlipperMass)
            RightFlipperExt.Omega = (xRightFlipperOmega)
            LeftFlipperExt.Mass = (xLeftFlipperMass)
            LeftFlipperExt.Omega = (xLeftFlipperOmega)
            RightFlipper2Ext.Mass = (xRightFlipper2Mass)
            RightFlipper2Ext.Omega = (xRightFlipper2Omega)
            LFExt.Mass = (xLFMass)
            LFExt.Omega = (xLFOmega)
            RFExt.Mass = (xRFMass)
            RFExt.Omega = (xRFOmega)
            RadToDeg = 57.295779513082320876798154814105
            prehitidx = 0

            ‘ *** Ball Angle Control? ***
            Function Atn2(x, y)
            If x > 0 Then
            Atn2 = Atn(y / x) * RadToDeg
            ElseIf x < 0 Then
            Atn2 = Sgn(y) * (180 – RadToDeg * Atn(Abs(y / x)))
            ElseIf y = 0 Then
            Atn2 = 0
            Else
            Atn2 = 180
            End If
            Atn2 = Atn2+90
            End Function

            Sub RightFlipper_prehit()
            If xBAM.Ball.Speed < 100 then
            RightFlipperExt.Mass = (xRightFlipperMass*1.4) ‘2000
            RightFlipperExt.Omega = (xRightFlipperOmega/1.3) ’40
            End if
            If xBAM.Ball.Speed >= 100 <=300 then
            RightFlipperExt.Mass = (xRightFlipperMass*1.3) ‘2000
            RightFlipperExt.Omega = (xRightFlipperOmega/1.2) ’40
            End if
            If xBAM.Ball.Speed >= 300 <600 then
            RightFlipperExt.Mass = (xRightFlipperMass*1.2) ‘2000
            RightFlipperExt.Omega = (xRightFlipperOmega/1.15) ’40
            End if
            If xBAM.Ball.Speed >= 600 <900 then
            RightFlipperExt.Mass = (xRightFlipperMass*1.1)
            RightFlipperExt.Omega = (xRightFlipperOmega/1.1) ’25
            End If
            If xBAM.Ball.Speed >= 900 <1200 then
            RightFlipperExt.Mass = (xRightFlipperMass)
            RightFlipperExt.Omega = (xRightFlipperOmega/1.05) ’25
            End If
            If xBAM.Ball.Speed >= 1200 <2000 then
            RightFlipperExt.Mass = (xRightFlipperMass)
            RightFlipperExt.Omega = (xRightFlipperOmega) ’25
            End If
            If xBAM.Ball.Speed >= 2000 <2250 then
            RightFlipperExt.Mass = (xRightFlipperMass*1.1)
            RightFlipperExt.Omega = (xRightFlipperOmega/1.1) ’25
            End If
            If xBAM.Ball.Speed >= 2250 <2500 then
            RightFlipperExt.Mass = (xRightFlipperMass*1.2)
            RightFlipperExt.Omega = (xRightFlipperOmega/1.15) ’25
            End If
            If xBAM.Ball.Speed >= 2500 <2750 then
            RightFlipperExt.Mass = (xRightFlipperMass*1.3)
            RightFlipperExt.Omega = (xRightFlipperOmega/1.2) ’25
            End If
            If xBAM.Ball.Speed >= 2750 then
            RightFlipperExt.Mass = (xRightFlipperMass*1.4)
            RightFlipperExt.Omega = (xRightFlipperOmega/1.3) ’25
            End If
            prehitidx = prehitidx + 1:FlipperDebug()
            End Sub

            Sub LeftFlipper_prehit()
            If xBAM.Ball.Speed < 100 then
            LeftFlipperExt.Mass = (xLeftFlipperMass*1.4) ‘2000
            LeftFlipperExt.Omega = (xLeftFlipperOmega/1.2) ’40
            End if
            If xBAM.Ball.Speed >= 100 <=300 then
            LeftFlipperExt.Mass = (xLeftFlipperMass*1.3) ‘2000
            LeftFlipperExt.Omega = (xLeftFlipperOmega/1.2) ’40
            End if
            If xBAM.Ball.Speed >= 300 <600 then
            LeftFlipperExt.Mass = (xLeftFlipperMass*1.2) ‘2000
            LeftFlipperExt.Omega = (xLeftFlipperOmega/1.15) ’40
            End if
            If xBAM.Ball.Speed >= 600 <900 then
            LeftFlipperExt.Mass = (xLeftFlipperMass*1.1)
            LeftFlipperExt.Omega = (xLeftFlipperOmega/1.1) ’25
            End If
            If xBAM.Ball.Speed >= 900 <1200 then
            LeftFlipperExt.Mass = (xLeftFlipperMass)
            LeftFlipperExt.Omega = (xLeftFlipperOmega/1.05) ’25
            End If
            If xBAM.Ball.Speed >= 1200 <2000 then
            LeftFlipperExt.Mass = (xLeftFlipperMass)
            LeftFlipperExt.Omega = (xLeftFlipperOmega) ’25
            End If
            If xBAM.Ball.Speed >= 2000 <2250 then
            LeftFlipperExt.Mass = (xLeftFlipperMass*1.1)
            LeftFlipperExt.Omega = (xLeftFlipperOmega/1.1) ’25
            End If
            If xBAM.Ball.Speed >= 2250 <2500 then
            LeftFlipperExt.Mass = (xLeftFlipperMass*1.2)
            LeftFlipperExt.Omega = (xLeftFlipperOmega/1.15) ’25
            End If
            If xBAM.Ball.Speed >= 2500 <2750 then
            LeftFlipperExt.Mass = (xLeftFlipperMass*1.3)
            LeftFlipperExt.Omega = (xLeftFlipperOmega/1.2) ’25
            End If
            If xBAM.Ball.Speed >= 2750 then
            LeftFlipperExt.Mass = (xLeftFlipperMass*1.4)
            LeftFlipperExt.Omega = (xLeftFlipperOmega/1.3) ’25
            End If
            prehitidx = prehitidx + 1:FlipperDebug()
            End Sub

            Sub FlipperDebug()
            ‘AddDebugText “Ballxy: ” & xBAM.Ball.Position.X & “, ” & xBAM.Ball.Position.Y & ” S:”
            ‘AddDebugText “BallSpeed: ” & xBAM.Ball.Speed
            ‘AddDebugText “Ballvel: x ” & xBAM.Ball.Velocity.X & “, y ” & xBAM.Ball.Velocity.Y & ” dir: ” & Atn2(xBAM.Ball.Velocity.X, xBAM.Ball.Velocity.Y)
            ‘AddDebugText “LeftFlipperMass: ” & (xLeftFlipperMass) & “, LeftFlipperOmega: ” & (xLeftFlipperOmega)
            ‘AddDebugText “RightFlipperMass: ” & (xRightFlipperMass) & “, RightFlipperOmega: ” & (xRightFlipperOmega)
            End Sub

            ‘ *** Blues flipper Mod v3 ***

            ‘ Sets small hidden flipper to be active or not for center shots
            Dim UseRightFlipperMid,UseLeftFlipperMid ‘ variables to detirmine trigger hit to activate smal non-rendered flipper
            UseRightFlipperMid=0:UseLeftFlipperMid=0

            ‘ The User Has Pressed A Key on the Keyboard..

            Sub AddKeyEvent(KeyEventVariable)
            Select Case KeyEventVariable
            case “LEFTFLIPPER-PRESSED”
            ‘ Check to see if TriggerRFM hit, then use small hidden flipper for center shots.
            IF LastSwitchHit IS TriggerLFM Then UseLeftFlipperMid = 1
            If UseLeftFlipperMid = 1 then
            LF.SolenoidOn
            TimerLF.Interval = 25:TimerLF.Enabled = True ‘ Makes sure small flipper is up before main flipper, prevents interference with shot
            Else
            LeftFlipper.SolenoidOn ‘ Trigger not hit, so just main flipper pressed
            End If
            TimerFL.Interval = 100:TimerFL.Enabled = True ‘ flipper wall colliable=false. Allows time for ball to roll down flipper
            PlaySound “FlipperUp”,(constSoundVolume):
            IF GuideLaneChange=1 THEN AlternateGuidesRight()
            case “LEFTFLIPPER-RELEASED”
            LeftFlipper.SolenoidOff:LF.SolenoidOff
            TimerFlipL.Set True,100 ‘ Sets timer to pop up heavy flipper wall
            PlaySound “FlipperDown”,(constSoundVolume)
            case “RIGHTFLIPPER-PRESSED”
            ‘ Check to see if TriggerRFM hit, then use small hidden flipper for center shots.
            IF LastSwitchHit IS TriggerRFM Then UseRightFlipperMid = 1
            If UseRightFlipperMid = 1 then
            RF.SolenoidOn
            TimerRF.Interval = 25:TimerRF.Enabled = True ‘ Makes sure small flipper is up before main flipper, prevents interference with shot
            Else
            RightFlipper.SolenoidOn:RightFlipper2.SolenoidOn ‘ Trigger not hit, so just main flipper pressed
            End If
            TimerFR.Interval = 100:TimerFR.Enabled = True ‘ flipper wall colliable=false. Allows time for ball to roll down flipper
            PlaySound “FlipperUp”,(constSoundVolume)
            IF GuideLaneChange=1 THEN AlternateGuidesLeft()
            case “RIGHTFLIPPER-RELEASED”
            RightFlipper.SolenoidOff:RightFlipper2.SolenoidOff:RF.SolenoidOff
            TimerFlipR.Set True,100 ‘ Sets timer to pop up heavy flipper wall
            PlaySound “FlipperDown”,(constSoundVolume)
            case “SPECIAL1-PRESSED”
            case “SPECIAL1-RELEASED”
            case “SPECIAL2-PRESSED”
            case “SPECIAL2-RELEASED”
            case “HUDDISPLAY-SHOWING”
            case “HUDDISPLAY-HIDDEN”
            ‘case “MENU-SHOWING”
            ‘case “MENU-HIDDEN”
            ‘case “INSTRUCTIONS-SHOWING”
            ‘case “INSTRUCTIONS-HIDDEN”
            ‘case “UPARROW-PRESSED”
            ‘case “UPARROW-RELEASED”
            ‘case “DOWNARROW-PRESSED”
            ‘case “DOWNARROW-RELEASED”
            ‘case “LEFTARROW-PRESSED”
            ‘case “LEFTARROW-RELEASED”
            ‘case “RIGHTARROW-PRESSED”
            ‘case “RIGHTARROW-RELEASED”
            End Select
            End Sub

            ‘ Two triggers for the small flippers
            Sub TriggerLFM_Hit():UseLeftFlipperMid = 1:AddDebugText “UseLeftFlipperMid = 1”:set LastSwitchHit=TriggerLFM:End Sub
            Sub TriggerLFM_UnHit():UseLeftFlipperMid = 0:AddDebugText “UseLeftFlipperMid = 0”:set LastSwitchHit=DummyTrigger:End Sub
            Sub TriggerRFM_Hit():UseRightFlipperMid = 1:AddDebugText “UseRightFlipperMid = 1”:set LastSwitchHit=TriggerRFM:End Sub
            Sub TriggerRFM_UnHit():UseRightFlipperMid = 0:AddDebugText “UseRightFlipperMid = 0”:set LastSwitchHit=DummyTrigger:End Sub

            ‘ Only Main Flipper up, so turn off wall, raise hidden flipper to match main flipper, and make sure the trigger variable is set to yes (hit event)
            Sub TimerFL_Expired()
            TimerFL.Enabled = False:FlipWallLeft.Collidable=FALSE:LF.SolenoidOn:UseLeftFlipperMid = 1
            end sub

            ‘ sets delay for a flipper flip if TriggerRFM_Hit. The main flipper swings only after a short delay to allow the hidden flipper to go first and hit the ball
            Sub TimerLF_Expired()
            TimerLF.Enabled = False:LeftFlipper.SolenoidOn
            end sub

            ‘ Restores wall if main flipper down (Flipper key Released)
            Sub TimerFlipL_Expired():
            TimerFlipL.Enabled = False:FlipWallLeft.Collidable=TRUE:UseLeftFlipperMid=0
            End Sub

            ‘ Only Main Flipper up, so turn off wall, raise hidden flipper to match main flipper, and make sure the trigger variable is set to yes (hit event)
            Sub TimerFR_Expired()
            TimerFR.Enabled = False:FlipWallRight.Collidable=FALSE:RF.SolenoidOn:UseRightFlipperMid = 1
            end sub

            ‘ sets delay for a flipper flip if TriggerRFM_Hit. The main flipper swings only after a short delay to allow the hidden flipper to go first and hit the ball
            Sub TimerRF_Expired()
            TimerRF.Enabled = False:RightFlipper.SolenoidOn:RightFlipper2.SolenoidOn
            end sub

            ‘ Restores wall if main flipper down (Flipper key Released)
            Sub TimerFlipR_Expired():
            TimerFlipR.Enabled = False:FlipWallRight.Collidable=TRUE:UseRightFlipperMid = 0
            End Sub

            ‘ *** Dynamic Shadow map ***
            Sub BAM_Init
            xBAM.ShadowMap “Ambient light”, 600 , 4 , 1250, 901, 100
            xBAM.ShadowMap “flasher1”, 1000 , 5 , 5, 1, 1
            xBAM.ShadowMap “flasher2”, 1000 , 5 , 5, 1, 1
            xBAM.ShadowMap “flasher3”, 1000 , 5 , 5, 1, 1
            xBAM.ShadowMap “flasherbotleft1”, 1000 , 5 , 5, 1, 1
            xBAM.ShadowMap “flasherbotright1”, 1000 , 5 , 5, 1, 1
            xBAM.ShadowMap “flashertopleft1”, 1000 , 5 , 5, 1, 1
            xBAM.ShadowMap “flashertopright1”, 1000 , 5 , 5, 1, 1
            xBAM.ShadowMap “bulbgirl1”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbhead1”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbhead6”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbjgcollect4”, 2000 , 2 , 5, 1, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbjgcollect7”, 2000 , 2 , 5, 1, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbjungle1”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbjungle2”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbleftlane”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbleftloop1”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbleftloop3”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbrightlane”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbrightloop1”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.5
            xBAM.ShadowMap “bulbrightloop3”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbskillshot3”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbtriggerguide3”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “bulbtriggerguide5”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “leftrubberbulb”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “BulbLS1”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “BulbLS2”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “rightslingshotbulb1”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            xBAM.ShadowMap “rightslingshotbulb2”, 2000 , 2 , 5, 1000, 1.288, 0.083, 0.05
            End Sub

            _____________________________________

            Latest projects and rants at My Facebook Page
            _____________________________________
            Latest Project: fpxEngine Table Builder

            #90940
            Gilrock
            Participant
              @gilrock
              Member

              Thanks for all that info.  I didn’t know you could even put physics inside the script with xml type tags.

              #90943
              shiva
              Participant
                @shiva
                Member

                You can now.  :)

                Look at monster bash, Rygar or Creature from the black lagoon for a example. You have to put a remark before each line, and it will only work in BAM, not anything else.

                 

                Here’s the link for the active flippers… http://www.gopinball.com/forum/viewtopic.php?f=86&t=6676

                _____________________________________

                Latest projects and rants at My Facebook Page
                _____________________________________
                Latest Project: fpxEngine Table Builder

                #90948
                Gilrock
                Participant
                  @gilrock
                  Member

                  Thanks I’ll check it out soon.  Not sure if it complicates things for me but my table has banana flippers.

                  I got side-tracked today because I basically just rebuilt the entire PC inside my cabinet to fix several video issues I’ve been having.  Looking really good but I still gotta get all the stuff I had running re-installed.

                  #91021
                  shiva
                  Participant
                    @shiva
                    Member

                    Actually, Banana flippers will work very well, even better than stock flippers if the collision on them is set properly. My Blues mod are in a sense banana flippers, in that I have a dropable wall that I use to set the ball at the proper angle to be a more realistic shot as it rolls down the flipper. The ball is actually rolling down the wall, and what it does is change the angle of where the flipper strikes the ball. The walls are shaped pretty much like banana flippers. ;)

                    Go to PinSimdb, and download Playboy xse and Star Trek xse under popotte and my FP author name Blue to see how it works with the angles. Playboy xse uses one of Slams exe, Star Trek xse uses a custom xml. Both tables play very well considering their age. About or almost VP9 quality I would say in a few areas.

                    _____________________________________

                    Latest projects and rants at My Facebook Page
                    _____________________________________
                    Latest Project: fpxEngine Table Builder

                    #96647
                    GeorgeH
                    Participant
                      @georgeh

                      Blue,

                      I tried part of your code.  I think you need this debug code:

                      AddDebugText “LeftFlipperMass: ” & (LeftFlipperExt.Mass) & “, LeftFlipperOmega: ” & (LeftFlipperExt.Omega) & “Ball Speed: ” & xBam.Ball.Speed
                      AddDebugText “RightFlipperMass: ” & (RightFlipperExt.Mass) & “, RightFlipperOmega: ” & (RightFlipperExt.Omega) & “Ball Speed: ” & xBam.Ball.Speed

                      I think it will make it easier for you to see what the settings are doing for you.

                      For the rest of you, physics can be a difficult go.  It seems to be getting more complex.  It used to be you just adjust strengths on all the table objects.  Then came XML files which added many parameters that you can, although the ball parameters are the ones I adjust the most.  Now, we have dynamic flippers which require adding some coding into the script.  So to do custom physics, you have to adjust strengths on the table objects, adjust the parameters in an XML file and then make adjustments for dynamic flippers in the script.  …But even the experts have some short cuts.  For example, most of the guys that do custom physics only adjust a few parameters in their favorite XML file.

                      There is a trick that anyone can try.  Download the “Phantom of the Opera ULTIMATE 1.04-1” table from here:

                      http://www.pinsimdb.org/pinball/table-24095-phantom_of_the_opera_ultimate

                      Open the script on this table and copy the line that says “PHYSICS XML” and copy everything down to the line that says “End of Flipper dynamics”. Then paste it in a different table somewhere below the script that says “Option Explicit”. I suggest reducing the strength of the slingshots above the flippers to the minimum. This will hopefully get you most of the way there or at least make the table play better than it did.

                      George

                      #205725
                      jamosb
                      Participant
                        @jamosb

                        With latest BAM I thought it wasn’t wise to use a different future_pinball.exe? I used the one that came with BAM. Is this just a old thread all physics now can be controlled through the bam menu including flippers.

                        #205744
                        TerryRed
                        Moderator
                          @terryred
                          MemberContributorModerator

                          With latest BAM I thought it wasn’t wise to use a different future_pinball.exe? I used the one that came with BAM. Is this just a old thread all physics now can be controlled through the bam menu including flippers.

                          That has always been the case with BAM for years, as it allowed you to change the base physics with any xml. No need for a different EXE. The original EXE work fine for everything as BAM fixes many bugs and allows for hiding the watermark and much more.

                          Today you now include whatever XML basic physics settings in the table script as well as any BAM dynamic flippers physics, etc. No XML file needed, and any XML file will be ignored since its included in the script.

                           

                          Look at my PinEvent tables, and you’ll see all the physics in one section near the top of the script, after the PinEvent section. To add new physics to any table as a starting point is pretty easy.

                           

                          ************ How to add new BAM dynamic physics to any older FP table **************

                          Add this line under option explicit:

                           

                          Option Explicit

                          xBAM.CreateAllExt() 'create BAM Extension commands. This should be at the top of the script (below Option Explicit)

                           

                          Then copy and paste this entire Physics section under that:

                           

                          '###########################################################################################
                          '#################################### PHYSICS SETTINGS #####################################

                          '=============================== PHYSICS XML ===========================
                          '<?xml version="1.0" encoding="utf-8"?>
                          '<document>
                          ' <!—Custom Physics for Halloween -->
                          ' <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="0" leftZoff="0"
                          ' rightXoff="0" rightYoff="0" 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="1000.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="50000.0" gravity="9800.0" angularDamp="0.5" angularAccel="5.25"
                          ' spinDampLoose="0.30" spinBackLoose="0.65"
                          ' spinDampNorm="0.40" spinBackNorm="0.65"
                          ' spinDampTight="0.70" spinBackTight="0.65"></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="235.0" impulseRandomness="25.0" warningLevel="290" 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.85" 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.50 ' 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 ball

                          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 ###################################
                          '###########################################################################################

                           

                          Now you just adjust the table slope and flipper settings in the table editor (and bumpers,etc) to your liking.

                          The green xml code can be adjusted if you want. BAM still uses that code even though it’s commented out.

                          You can make adjustments for dynamic flippers in the script as well to your liking.

                          SAVE the table…exit and reload the table after applying the changes.

                           

                           

                          #210219
                          GeorgeH
                          Participant
                            @georgeh

                            I have created a tutorial on how to add physics to FP:

                            https://pinballnirvana.com/forums/index.php?threads/a-simple-way-to-add-physics-to-any-future-pinball-fp-table-with-original-physics.20001/

                            #210246
                            TerryRed
                            Moderator
                              @terryred
                              MemberContributorModerator

                              What are the chances of this happening… and on the same afternoon! I started typing my own tutorial this in the morning due to many requests on other groups:

                              https://pinballnirvana.com/forums/index.php?threads/how-to-add-new-bam-dynamic-physics-to-a-future-pinball-table.20002/

                               

                              … 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. He’s more knowledgeable on the topic than I am!

                               

                              https://pinballnirvana.com/forums/index.php?threads/a-simple-way-to-add-physics-to-any-future-pinball-fp-table-with-original-physics.20001/

                               

                               

                            Viewing 13 posts - 1 through 13 (of 13 total)

                            Forums are currently locked.

                            ©2024 VPinBall.com

                            Log in with your credentials

                            Forgot your details?