Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » BAM corner




Post new topic Reply to topic  [ 86 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next
Author Message
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Fri Aug 17, 2018 5:00 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2111
Location: Ontario, Canada
Here's a possible solution to Blue's Bally Table flipper flick up inlane trick :lol:

viewtopic.php?f=86&t=3249&p=86954&hilit=cheap#p86954



Last edited by Gimli on Fri Aug 17, 2018 8:41 pm, edited 1 time in total.

Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Fri Aug 17, 2018 8:38 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2111
Location: Ontario, Canada
Trick 2
Flipper to Flipper off of post
"Slingshot Pass"


Last edited by Gimli on Fri Aug 17, 2018 11:12 pm, edited 1 time in total.

Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Fri Aug 17, 2018 10:17 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1685
Location: Arkansas, USA
Gimli wrote:
Trick 2
Flipper to Flipper off of post


The videos I have seen of this trick have the post in exactly the right spot. That is why it looks so easy when they do it.

George


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Fri Aug 17, 2018 11:05 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2111
Location: Ontario, Canada
That's what I thought initially too.
When Rav posted this, I thought there must be more to it
Ravarcade wrote:
.My new video:
https://youtu.be/47UfGFcaZmc
(it is still uploading).

Here is video with trick i try to recreate:
https://www.youtube.com/watch?v=b2ZJQYk6OMk
"Slingshot pass" time in video: 0:15


In the occasional old FP tables where this does work, it is likely due to a combination of all table physics properties and not simply post location...

So a standard way that works on all tables has appeal.

Ideally we code a flipper template that enables all the standard tricks...


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Fri Aug 17, 2018 11:15 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1685
Location: Arkansas, USA
I am almost certain that the trick would be easier if you moved the post on the slingshot closer to the center of the table. That is the way it appears to be on the video of the real table. It is my understanding that these tricks only work on certain tables and I think this is the reason why. ...But then I am not an expert for sure.

George


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Fri Aug 17, 2018 11:27 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2111
Location: Ontario, Canada
I agree post position is most important factor, but post composition , ball speed, ball weight, gravity and flipper angle are also critical.

It can be moved more to centre but at the risk of obstructing center shots from the flippers...perhaps

I am just guessing...


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Sat Aug 18, 2018 6:56 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1685
Location: Arkansas, USA
It is true that you can mess up the shots if you move the post on the slingshot. ...But that is why the tricks don't always work. I think it is like that on the real world tables too.

George


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Sat Aug 18, 2018 1:41 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2111
Location: Ontario, Canada
I have added this template to several tables and I believe it GREATLY enhances flipper accuracy.

It uses Rav's bounce control, and the Contact Point Template that George and I used for Phantom of the Opera.

It has an enclosed XML tweaked by George,that you can change as desired...

I am sure we will all refine and improve things as we go , but I think it is an excellent start.

Thanks Ravarcade for enabling all of this !!

Code:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''BAM Stuff''''''''''''''''''''''''''''''''''''''''''''''''''''
' xBAM.FixScore

'=============================== PHYSICS XML ===========================
'<?xml version="1.0" encoding="utf-8"?>
'<document>
'
'  <!-- Custom Physics for Phantom Of The Opera -->
'  <!-- Note. Changing the FPS will effect how how all the other values interact with each other and should
'  be a high value due to the fact the ball in a pinball is moving very fast and lower values will cause the ball
'  to go into objects fractionally (thus we must sample at a higher rate)
'
'  threaded (true/false) defines if the physics runs in a separate thread for multicore CPU's (dev version only)
'  -->
'  <physics fps="296" threaded="1"></physics>
'
' <!-- Settings for various objects -->
'  <ball newtonDamping="0" mass="71" gravity="5200" damping="1.05"></ball>
'
'  <!-- moeMethod="0" Auto-calculate the moments of Inertia for the flipper using internal Newton functions -->
'  <!-- moeMethod="1" Calculate the Flipper MOE based on a rectangle (changes aiming behaivour) -->
'  <!-- Note: omega is rotational force -->
'  <flipper releaseOmega="18" rotationSpeedChart="{0.0,100.0}[0.0,100.0]" newtonDamping="0" mass="20150" omega="44" moeMethod="0"
'           leftXoff="0" leftYoff="1500" leftZoff="0"
'           rightXoff="0" rightYoff="1500" rightZoff="0"></flipper>
'
'  <!-- impluse            The amount of power applied to the ball (normal setting)..
'                          this is then scalled up or down to suit the strength setting
'       impulseRandomness  Random Percentage (of impulse) added to impulse when the ball hits the object
'       vectorRandomness   Random Angle change +/- value to ball direction
'  -->
'  <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="40000.0"></plunger>
'  <slingshot impulse="700.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="40.0"></emkicker>
'  <varitarget mass="500.0" damping="0.9" tension="3.0" return="15.0"></varitarget>
'  <magnet impulse="10.0" impulseRandomness="2"></magnet>
'
' <!-- Nugde 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 -->
'
'  <!-- Static coefficient
'       - - - - - - - - - -
'       Static friction is the force that holds back a stationary object up to the point that it
'       just starts moving. Thus, the static coefficient of friction concerns the force restricting
'       the movement of an object that is stationary on a relatively smooth, hard surface.
'
'       Kinetic coefficient
'       - - - - - - - - - -
'       Once you overcome static friction, kinetic friction is the force holding back regular motion.
'       This, kinetic fiction coefficient of friction concerns the force restricting the movement of
'       an object that is sliding on a relatively smooth, hard surface.
'       
'       Both coefficients are based on material pairs (ie wood on wood, metal on wood) etc..
'
'       In FP all the settings are for Ball on Wood/Plastic/Rubber/Metal etc..
'
'       and from the Newton docs..
'       staticFriction and kineticFriction must be positive values. kineticFriction must be lower or equal than
'       staticFriction. It is recommended that staticFriction and kineticFriction be set to a value
'       lower or equal to 1.0, however because some syntetic materials can have higher than one coeficient
'       of friction Newton allows for the coeficient of friction to be as high as 2.0.
'
'       For more information refer to http://en.wikipedia.org/wiki/Friction
'  -->
'
'  <!-- Default Materal Settings to act as defaults incase we forget to set an object during development. 
'       There shouldn't be any objects set to this material so these are just a fail safe values -->
'  <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="0.025" kineticFriction="0.015"></playfieldMat>
'
'  <!-- Primary Material Types -->
'  <metalMat softnessCoef="0.01" elasticCoef="0.1" staticFriction="0.01" kineticFriction="0.01"></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.42" staticFriction="0.04" kineticFriction="0.055"></rubberHardMat>
'  <rubberIntMat softnessCoef="0.1" elasticCoef="0.52" staticFriction="0.05" kineticFriction="0.065"></rubberIntMat>
'  <rubberSoftMat softnessCoef="0.12" elasticCoef="0.62" staticFriction="0.06" kineticFriction="0.075"></rubberSoftMat>
'
'  <!-- Object Specific Material Settings -->
'  <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 ===========================

Const BAM_VERSION = 0
AddDebugText BAM_VERSION


' === Dynamic Flipper Settings ===


Sub BAM_Init()
   If BAM_VERSION < 233 then Exit Sub
   Set RightFlipperExt      = xBAM.Flipper("RightFlipper")
   Set LeftFlipperExt       = xBAM.Flipper("LeftFlipper")
   RightFlipperExt.Omega    =         43
   RightFlipperExt.SetMaterial       0.4,        0.1,       0.05,      0.065
   LeftFlipperExt.Omega     =         43
   LeftFlipperExt.SetMaterial       0.4,        0.1,       0.05,      0.065
End Sub


If BAM_VERSION => 233 then
Dim RightFlipperExt,LeftFlipperExt            ' Needed for BAM
 Dim omegaCorrection
xBAM.BallSpeedLimit = 3000
End If





'Rav's Fastest ball speed debug start
' ----------------------- This will record fastert ball (and display new record) -------------------
Dim FastestBallSpeed
FastestBallSpeed = 0
Sub NewtonPhysicsTick()
   Dim Ball
   Set Ball = xBAM.BallCloseTo(0,0,0)

   If Ball.Exist Then
      If FastestBallSpeed < Ball.Speed Then
         FastestBallSpeed = Ball.Speed
         AddDebugText "New Ball Speed Record: " & FastestBallSpeed
      End If
   End If
End Sub
'Rav's Fastest ball speed debug end






Sub OnPreHitFlipperSettings(FlipperExt)
   If BAM_VERSION < 233 then Exit Sub
 OnPreHitFlipperSettings_bounceControl(FlipperExt)
End Sub

Sub RightFlipper_prehit()
   If BAM_VERSION < 233 then Exit Sub
   OnPreHitFlipperSettings(RightFlipperExt)
   omegaCorrection = 45 - (RightFlipperExt.ContactPoint * 13) ' Max omega is 45 and min is 29.4.
      If RightFlipperExt.ContactPoint < 0.0 then RightFlipperExt.Omega = 45
      If RightFlipperExt.ContactPoint > 1.2 then RightFlipperExt.Omega = 29.4
      If (RightFlipperExt.ContactPoint => 0.0) And (RightFlipperExt.ContactPoint =< 1.2) then
         RightFlipperExt.Omega = omegaCorrection
      End if
      
      
   
End Sub

Sub LeftFlipper_prehit()
   If BAM_VERSION < 233 then Exit Sub
   OnPreHitFlipperSettings(LeftFlipperExt)
      omegaCorrection = 45 - (LeftFlipperExt.ContactPoint * 13)
      If LeftFlipperExt.ContactPoint < 0.0 then LeftFlipperExt.Omega = 45
      If LeftFlipperExt.ContactPoint > 1.2 then LeftFlipperExt.Omega = 29.4
      If (LeftFlipperExt.ContactPoint => 0.0) And (LeftFlipperExt.ContactPoint =< 1.2) then
         LeftFlipperExt.Omega = omegaCorrection
      End if
      
   
   End Sub

'Bounce Control (Note that bounce control over rides flipper elasticity listed above. See lines "RightFlipperExt.Omega ="/"RightFlipperExt.Omega=")
Sub OnPreHitFlipperSettings_bounceControl(FlipperExt)
   If BAM_VERSION < 233 then Exit Sub
   ' Params to tweak
   const base_elasticCoef                        = 0.8  ' very bouncy flipper rubber
   const expected_ball_speed_after_hit           = 280  ' 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.10 ' if flipper is not in starting point, reduce elasticCoef by 10%
   const min_elasticCoef                         = 0.08 ' 2%, ball will almost glue to flipper, this is minimum value

   If FlipperExt.Hit Then
      Dim elasticCoef
      ' ball_speed_after_hit = elastic_coef * ball_speed_before_hit
      ' so, elastic_coef = expected_ball_speed_after_hit / ball_speed_before hit !
            elasticCoef = 1.0
      If expected_ball_speed_after_hit < xBAM.Ball.Speed Then elasticCoef = expected_ball_speed_after_hit / xBAM.Ball.Speed

      ' now add little bit to preserv atleast 5% of ball speed before hit (not all balls should end with 240 mm/s)
      elasticCoef = elasticCoef + minimum_elasticCoef_to_scale_fast_balls

      ' make sure, we to not have elasticCoef higher than base value
      If elasticCoef > base_elasticCoef Then elasticCoef = base_elasticCoef

      ' now, reduce elastic coef if flipper is not at StartAngle (1 deg difference or more required)
      If FlipperExt.AngleDiff > 1 Then elasticCoef = elasticCoef - reduction_for_flipper_in_motion

      ' ... finally make sure, that elasticCoef will not be "negative" or to smalll
      If elasticCoef < min_elasticCoef Then elasticCoef = min_elasticCoef

      FlipperExt.SetMaterial elasticCoef
   End If

End Sub
''''''''''''''''''''End of Flipper dynamics'''''''''''''''''''''''''''''''''


Here is the same code with the XML removed

Code:
Const BAM_VERSION = 0
AddDebugText BAM_VERSION


' === Dynamic Flipper Settings ===


Sub BAM_Init()
   If BAM_VERSION < 233 then Exit Sub
   Set RightFlipperExt      = xBAM.Flipper("RightFlipper")
   Set LeftFlipperExt       = xBAM.Flipper("LeftFlipper")
   RightFlipperExt.Omega    =         43
   RightFlipperExt.SetMaterial       0.4,        0.1,       0.05,      0.065
   LeftFlipperExt.Omega     =         43
   LeftFlipperExt.SetMaterial       0.4,        0.1,       0.05,      0.065
End Sub


If BAM_VERSION => 233 then
Dim RightFlipperExt,LeftFlipperExt            ' Needed for BAM
 Dim omegaCorrection
xBAM.BallSpeedLimit = 3000
End If





'Rav's Fastest ball speed debug start
' ----------------------- This will record fastert ball (and display new record) -------------------
Dim FastestBallSpeed
FastestBallSpeed = 0
Sub NewtonPhysicsTick()
   Dim Ball
   Set Ball = xBAM.BallCloseTo(0,0,0)

   If Ball.Exist Then
      If FastestBallSpeed < Ball.Speed Then
         FastestBallSpeed = Ball.Speed
         AddDebugText "New Ball Speed Record: " & FastestBallSpeed
      End If
   End If
End Sub
'Rav's Fastest ball speed debug end






Sub OnPreHitFlipperSettings(FlipperExt)
   If BAM_VERSION < 233 then Exit Sub
 OnPreHitFlipperSettings_bounceControl(FlipperExt)
End Sub

Sub RightFlipper_prehit()
   If BAM_VERSION < 233 then Exit Sub
   OnPreHitFlipperSettings(RightFlipperExt)
   omegaCorrection = 45 - (RightFlipperExt.ContactPoint * 13) ' Max omega is 45 and min is 29.4.
      If RightFlipperExt.ContactPoint < 0.0 then RightFlipperExt.Omega = 45
      If RightFlipperExt.ContactPoint > 1.2 then RightFlipperExt.Omega = 29.4
      If (RightFlipperExt.ContactPoint => 0.0) And (RightFlipperExt.ContactPoint =< 1.2) then
         RightFlipperExt.Omega = omegaCorrection
      End if
      
      
   
End Sub

Sub LeftFlipper_prehit()
   If BAM_VERSION < 233 then Exit Sub
   OnPreHitFlipperSettings(LeftFlipperExt)
      omegaCorrection = 45 - (LeftFlipperExt.ContactPoint * 13)
      If LeftFlipperExt.ContactPoint < 0.0 then LeftFlipperExt.Omega = 45
      If LeftFlipperExt.ContactPoint > 1.2 then LeftFlipperExt.Omega = 29.4
      If (LeftFlipperExt.ContactPoint => 0.0) And (LeftFlipperExt.ContactPoint =< 1.2) then
         LeftFlipperExt.Omega = omegaCorrection
      End if
      
   
   End Sub

'Bounce Control (Note that bounce control over rides flipper elasticity listed above. See lines "RightFlipperExt.Omega ="/"RightFlipperExt.Omega=")
Sub OnPreHitFlipperSettings_bounceControl(FlipperExt)
   If BAM_VERSION < 233 then Exit Sub
   ' Params to tweak
   const base_elasticCoef                        = 0.8  ' very bouncy flipper rubber
   const expected_ball_speed_after_hit           = 280  ' 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.10 ' if flipper is not in starting point, reduce elasticCoef by 10%
   const min_elasticCoef                         = 0.08 ' 2%, ball will almost glue to flipper, this is minimum value

   If FlipperExt.Hit Then
      Dim elasticCoef
      ' ball_speed_after_hit = elastic_coef * ball_speed_before_hit
      ' so, elastic_coef = expected_ball_speed_after_hit / ball_speed_before hit !
            elasticCoef = 1.0
      If expected_ball_speed_after_hit < xBAM.Ball.Speed Then elasticCoef = expected_ball_speed_after_hit / xBAM.Ball.Speed

      ' now add little bit to preserv atleast 5% of ball speed before hit (not all balls should end with 240 mm/s)
      elasticCoef = elasticCoef + minimum_elasticCoef_to_scale_fast_balls

      ' make sure, we to not have elasticCoef higher than base value
      If elasticCoef > base_elasticCoef Then elasticCoef = base_elasticCoef

      ' now, reduce elastic coef if flipper is not at StartAngle (1 deg difference or more required)
      If FlipperExt.AngleDiff > 1 Then elasticCoef = elasticCoef - reduction_for_flipper_in_motion

      ' ... finally make sure, that elasticCoef will not be "negative" or to smalll
      If elasticCoef < min_elasticCoef Then elasticCoef = min_elasticCoef

      FlipperExt.SetMaterial elasticCoef
   End If

End Sub
''''''''''''''''''''End of Flipper dynamics'''''''''''''''''''''''''''''''''


Simply copy and paste one of these templates to the top of script under Option Explicit
and that's it....


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Sat Aug 18, 2018 5:06 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1685
Location: Arkansas, USA
You guys may want to change the omega settings for your table. The number 13 is a multiplication factor that makes the omega ramp between 29.4 and 45 depending on the contact point. The contact point at the tip is 1.2 and the base is 0.

omegaCorrection = 45 - (RightFlipperExt.ContactPoint * 13)

You just substitute 1.2 into the formula above for the contact point and you will get the omega as 29.4 which is the tip of the flipper. If you substitute "0" for the contact point in the formula, you get 45 which is the omega at the base.

You can increase the multiplication factor which will decrease the omega (make it less strong) at the tip of the flipper. Say you want to increase the multiplication factor to 14. You can use this formula to determine the omega.

omega = 45-(1.2 x 14)
omega = 45-16.8
omega = 28.2

You would then want to change the 29.4 in the line of code below to 28.2:

If RightFlipperExt.ContactPoint > 1.2 then RightFlipperExt.Omega = 29.4

If you want to change the omega at the base, just change the 45 in the following 2 lines to the value that you want to try:

omegaCorrection = 45 - (RightFlipperExt.ContactPoint * 13)

If RightFlipperExt.ContactPoint < 0.0 then RightFlipperExt.Omega = 45


The thinking behind this is that it keeps the omega the same around the tip and the base of the flipper which I think is important. The code anticipates the values of the contact point could be greater than 1.2 or less than 0 but it does not use those values if they happen to occur.

The next section of code below the omega stuff determines the amount of ball bounce off the flippers. It has constants that you can change. If you change the value of the constant, your new value will be inserted into the formula which is located just below the constants. You can just insert different values and see what happens. That is what I did.

That is my thought process behind this anyway and it makes the flippers work pretty well. Some of you may think of a different approach.

George


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Mon Aug 20, 2018 3:42 pm 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1041
Location: Sicily-Italy
Great job, in this new option, thanks to all of you :shock:


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 86 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next

Board index » Future Pinball » BAM corner


Who is online

Users browsing this forum: No registered users and 2 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: