Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » BAM corner




Post new topic Reply to topic  [ 148 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13, 14, 15  Next
Author Message
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Tue Dec 04, 2018 1:17 am 
Offline

Joined: Sun Sep 13, 2015 1:16 pm
Posts: 242
Gimli wrote:
I am sure Ill love it George !
But I did play a real Indiana Jones table last week and flipper bounce was crazy, I didn't like it all.

It will be good I guess in future tables to have a menu option for lively bounce on/off


Flipper bounce really is important...as it allows you to pass the ball to the other flipper without pushing a button,etc... if you watch my more recent MOTU PuP-Pack demo on my Youtube channel (TerryRed), you will see how I use it regularly.


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Tue Dec 04, 2018 1:07 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1770
Location: Arkansas, USA
TerryRed wrote:
Gimli wrote:
I am sure Ill love it George !
But I did play a real Indiana Jones table last week and flipper bounce was crazy, I didn't like it all.

It will be good I guess in future tables to have a menu option for lively bounce on/off


Flipper bounce really is important...as it allows you to pass the ball to the other flipper without pushing a button,etc... if you watch my more recent MOTU PuP-Pack demo on my Youtube channel (TerryRed), you will see how I use it regularly.


I actually set the bounce on MOTO so that when the ball is released by the organ, it will fall and bounce off the right flipper and you can catch it (cradle) with the left flipper. Then you are set up to hit the organ again with the left flipper. I don't think I ever said that though I might have hinted it.

George


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Tue Dec 04, 2018 4:09 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2207
Location: Ontario, Canada
SLAMT1LT wrote:
I've copied the Gimli (GeorgeH, Ravarcade) flipper code into all my other ULTIMATE Pro tables now and holy moly, what a difference. I don't give a shit about high scores but I'm pretty certain I'm breaking all my previous bests.

So where does Future Pinball rank now that it has [almost] fixed flippers? It's the best, no question. Combined with the always-improving BAM, it's just in a league of it's own.

​I know you guys are not playing what I'm playing so you don't really understanding what I keep banging on about, but trust me.... what you've played before and what you're currently playing is garbage compared to what Future Pinball is capable of now.

​It's coming.

:D


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Wed Dec 05, 2018 6:18 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2207
Location: Ontario, Canada
I have asked Ravarcade if he can explain the parameters in his bounce control template and give a few "recipes" of different bounce blends.

Specifically, I would like to see a little more bounce when ball falls down directly on flippers of course depending the vertical velocity

:shock:


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Thu Dec 06, 2018 2:01 pm 
Offline

Joined: Mon Mar 25, 2013 4:02 pm
Posts: 935
I'm not table dev, so stuffs here will not give you ready to use solution. It will be more guide how to tweak.

First here is another demo table with few "bounce control" functions:
https://www.ravarcade.pl/beta/Ramp-VUK- ... c-ctrl.fpt
Run this table in FP debug mode (F9).
Press B to switch "bounce control" subroutines. (In FP debug window you will have message with selected mode).

Here is video how i use BAM to test it:
https://youtu.be/LmARVkTH5CM

Here is starting "Bounce Control" function:
http://gopinball.com/forum/viewtopic.ph ... rol#p86695

Now something harder. Charts created in spreadsheet:
https://docs.google.com/spreadsheets/d/ ... au/pubhtml
and spreadsheet if you want to tweek it:
https://docs.google.com/spreadsheets/d/ ... output=ods

What is on first chart: "Ball speed after hit as function of ball speed before hit".
- Green line - default FP behaviour. Here is just for comparision
- Blue line - "Bounce Control" when filpper button is not pressed and flipper is in starting position. As you can see, for slow balls flipper is VERY bouncy bounced but for fast balls is become less bouncy. Important thing: if you increase ball speed before hit, after hit ball become faster too.
- Red line - "Bounce Control" when filpper button is pressed or flipper is in motion. ... Like forfor "blue line", but little less bounce. Please look what is happening when ball speed is incressing from 330 to 1400... ball becom slower when you increase ball speed. This is wrong. You may see this effect on my video, time 1:15 - 1:35
- Orange line - "Bounce Control" when filpper button is pressed or flipper is in motion with FIX. So, if you increase ball speed before hit you will always increase ball speed after hit. But you can control speed of ball after hit.

Second chart: "elastic_coef as function of ball speed before hit".

Now fixed "Bounce control" subroutine:
Code:
Sub OnPreHitFlipperSettings_bounceControl(FlipperExt)
   ' Params to tweak
   const base_elasticCoef                        = 0.8  ' very bouncy flipper rubber
   const expected_ball_speed_after_hit           = 240  ' calc elasticCoef to get desired ball speed after ball hit flipper
   const minimum_elasticCoef_to_scale_fast_balls = 0.05 ' 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.20 ' 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


Now descriptions of params:
1. base_elasticCoef - use to control how bouncy if flipper for slow balls. That is very simple.
Image

2. expected_ball_speed_after_hit - same as name, expected ball speed after hit. It is easier to set this value than use complicated math function with exponents. Use it to limit ball speed after hit.
Image

3. minimum_elasticCoef_to_scale_fast_balls - positve value is resposible for "increase ball speed before hit you will always increase ball speed after hit".
Image

Some explanation:
Flipper is: plastic/matalic core with rubber band around it.
When ball hit flipper, rubber work like spring: it takes energy from ball and later it gives back big part of that energy to ball.
But... rubber is thin. It have limited capcity. If ball have more energy (higher speed) than rubber capacity, when that energy will not return to ball.
... Not from rubber. Behind rubber is plastic/metalic core of flipper. It will also recive energy and will also give that energy back to ball later... but rubber is more "effective" in storing/restoring energy (elasticCoef is high) than plastic/metal (elasticCoef). So....
base_elasticCoef - is rubber...
expected_ball_speed_after_hit - .... is rubber capacity for energy to store/restore ....
minimum_elasticCoef_to_scale_fast_balls - .... flipper core (plastic/metal) elastic coef ....

4. reduction_for_flipper_in_motion -
Image
If flipper is at base position, it is holded by solid elements. So, when ball hit flipper, flipper will not move. If flipper is in motion (or holded at max angle when you press button), it is holded by electromagnets. In that position, when flipper is hit, part of energy will go to that electromagnets and will not return to ball.... So, we can reduce flipper elasticCoef to simulate this.

5. min_elasticCoef - (remove) not needed after fixing original "Bounce Control".
Original "Bounce Control" have few problems: if ball speed before hit was to high and flipper was in motion ("reduction_for_flipper_in_motion" was aplied), when ball speed after hit was reduced "too much". Some times to zero or below zero (yup, it does not make sense). So, to prevent it i have to add check for too small "elasticCoef". After fix, when reduction_for_flipper_in_motion is aplied different, it is not needed.
Image

Now comparision of different "Bounce-Control" functions in demo table.
1. OnPreHitFlipperSettings_bounceControl.
If you compare it with original function from this post: http://gopinball.com/forum/viewtopic.ph ... rol#p86695:
- added variable ballSpeed to store local value of xBAM.Ball.Speed. In other "OnPreHitFlipperSettings_....." functions i will use different ball speed, so i added variable to minimize changes
- added check, if ball speed is lower than "1". Sometimes ball speed is almost zero or zero. If it is zero we will have "div by zero" error in script... so it is only small fix for possible error

2. OnPreHitFlipperSettings_bounceControl_fixed
- "reduction_for_flipper_in_motion" is applied different way to prevent errors in ball behave when fast ball is bounced from "activated" flipper.
- min_elasticCoef is removed

3. OnPreHitFlipperSettings_bounceControl_vertical
- FlipperExt.BallVSpeed is used as ball speed, instead of xBAM.Ball.Speed. See this image: https://www.ravarcade.pl/beta/NewFlippe ... erties.png
Gimli asked about usage of "vertical" ball speed.
I have found, that with that setting when ball goes thru inlines, when it is hard to stop ball on activated flipper. If ball speed is "medium" ball vertical speed is very low. It makes ball bouncy for flipper. So, ball can bounce few times on flipper and without friction when ball is not in touch with flipper it will not stop easly.

4. OnPreHitFlipperSettings_bounceControl_verticalAverge
- as BasllSpeed is use averge value of FlipperExt.BallVSpeed and xBAM.Ball.Speed. So, for fast "horizontal" balls flipper will become less bouncy.
In other words, you may find better way to calc "ball speed" before it will be used by "bounce control" routine.

Thats all folks.

_________________
http://www.ravarcade.pl
Better Arcade Mode
current BAM version: v1.4-241, released: Nov 9, 2018


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Thu Dec 06, 2018 2:56 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2207
Location: Ontario, Canada
Thanks Rav !
I will pour over this stuff and hopefully glean some understanding


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Thu Dec 06, 2018 4:06 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1770
Location: Arkansas, USA
ravarcade wrote:
...

4. OnPreHitFlipperSettings_bounceControl_verticalAverge
- as BasllSpeed is use averge value of FlipperExt.BallVSpeed and xBAM.Ball.Speed. So, for fast "horizontal" balls flipper will become less bouncy.
In other words, you may find better way to calc "ball speed" before it will be used by "bounce control" routine.


Rav,

When we make adjustments to the constants, should we adjust the 0.5 in this line also or not change it?

ballSpeed = (FlipperExt.BallVSpeed + xBAM.Ball.Speed) * 0.5

George


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Thu Dec 06, 2018 4:59 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2207
Location: Ontario, Canada
Very cool
I love the demo options

Give the demo table a try George under debug mode and keep pressing "B" on keyboard to try all
5 options.....


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Fri Dec 07, 2018 12:11 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1770
Location: Arkansas, USA
Rav,

I added your "Fixed" code and "Vertical Average" code to two copies of Iron Man, replacing the old bounce code without changing any of the constants. The flippers didn't have as much bounce as your demo. Is there a reason for this?

I saved the two versions of the table here:
https://www.dropbox.com/sh/hi33cnwiiwy0 ... jXQZa?dl=0

George


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Fri Dec 07, 2018 7:59 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2207
Location: Ontario, Canada
GeorgeH wrote:
Rav,

I added your "Fixed" code and "Vertical Average" code to two copies of Iron Man, replacing the old bounce code without changing any of the constants. The flippers didn't have as much bounce as your demo. Is there a reason for this?

I saved the two versions of the table here:
https://www.dropbox.com/sh/hi33cnwiiwy0 ... jXQZa?dl=0

George

I noticed the same thing.....bounce control code doesn't seem to work if you have flipper material settings elsewhere in the code


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 148 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13, 14, 15  Next

Board index » Future Pinball » BAM corner


Who is online

Users browsing this forum: No registered users and 4 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: