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 ... 3, 4, 5, 6, 7, 8, 9  Next
Author Message
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Fri Jul 27, 2018 2:07 pm 
Offline

Joined: Wed Nov 30, 2016 7:43 pm
Posts: 12
Great stuff! It's one thing deriving classical mechanics equations in engineering physics classes and another thing programming this stuff for games.

I may have to buy you a case of Lech :-)


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Fri Jul 27, 2018 3:58 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2129
Location: Ontario, Canada
It's another thing still after Rav has had a case of Lech :lol:

Having a Stella as I type this
;)


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Sat Jul 28, 2018 4:32 pm 
Offline

Joined: Mon Mar 25, 2013 4:02 pm
Posts: 930
Here is BAM v235 (release candidate):
https://www.ravarcade.pl/beta/BAM.dll

Change log:
1. modified log/charts created for flipper when "SolenoidOn" and "SolenoidOff" is called:
- removed "grean" line (i think it is not usefull).
- red (flipper angle) and yellow (omega) both are as function of time. (Previously omaga was function of angle).
- adder maximum and minimum Omega valuses.

2. Moddified way how omega is calculated from flipper-rotation-chart (only for SolenoidOn). Now from chart is calculated "force" when it is applied to flipper. Where is difference:
- if there is no ball on flipper, no hit, then flipper will move exaclll same way as previous;
- ... but if ball lays on flipper and is heavy (in relation to flipper) it will reduce finall flipper rotation speed. So, in next frame omega applied to flipper will not be just value taken from chart, but it will be calculated like for "force" applied and result omega will be little smaller.
It seams complicated to explain, but now flipper rotation work more like result of rotation force than blind constant rotation.

-----
Demo table:
https://www.ravarcade.pl/beta/FlipperExt-demo-3.fpt

I spend whole day on tweaking it... and i'm not very happy with results. Maybe someone else will be able to make more. I'm giving up here.
Whole demo is focused on ball controll with flipper.

Here is list what i did and why:
1. Ball must have weight, = 80. So it is 4 times havier than FP.
2. Gravity set 9000, Damping = 0.25
That was easy part. For me this gives me ball move as i want.

3. Flipper mass.... first i try 600. So, Flipper mass / Ball mass = 7.5.
I set it this way, because i want to see how flipper moves when it is hit by fast ball. See video:
https://youtu.be/1wyL8Y2iDsw
But at end i have set it to 2000 and this is completly invisible. Reason: see No. 7.

4. elasticCoef - OnPreHitFlipperSettings_bounceControl.
I use _prehit subroutine to change ball bounce on flipper. Nothing else is controled in _prehit.
Also i moddified it little bit:
- elasticCoef is calcuated base on FlipperExt.BallVSpeed. Previously it was xBAM.Ball.Speed. I change for 2 reasons: (1) only VSpeed have meaning in real world (or in 95%), (2) when ball is roling horizontaly over flipper (from "inline") change "elasticCoef " have big (random) impact on how ball flys. See No. 7.

5. Rotation Chart for "SolenoidOn":
Image
With points:
Code:
   0 ms =   3.0 %
  20 ms =   5.0 %
38.5 ms =  11.7 %
  55 ms =  30.0 %
  77 ms = 100.0 %

Goal is: slow flipper move after button is pressed.
This allows me to make: "tap pass"
http://funwithbonus.com/new-pinball-dic ... -tap-pass/
On my cheap membrane keyboard without long training ~30 % times

6. Rotation Chart for "SolenoidOff":
Image
With points:
Code:
  0.0 ms = 200.0 %
  5.0 ms =   5.0 %
 30.0 ms =  15.0 %
 60.0 ms = 100.0 %

You may think it is odd. Big "jump" at begin, right after button was released then long slow move and at end fast again.
Goal is: right after button was release flipper should stay for some time near "maximum angle" position, but not at that "maximum" angle but little below. So, when i press button again quickly i should be able to make: "tip pass"
http://funwithbonus.com/new-pinball-dic ... -tip-pass/
This i hard to do it on my keyboard, i have less than 5 % successed passes. I belive better keyboard will make it easier.

Here is result how flipper moves when button is pressed and release:
https://youtu.be/Mxh8lzBjBnQ

7. Captured flipper rotation log/charts:
A. Without ball:
Image
B. With ball and flipper weght = 600
Image
C. With ball and flipper weght = 2000
Image
So, low flipper mass results in slow ball speed at end, flipper rotation speed accelerate when ball is not in contact with flipper, flipper speed is reduced whem ball hit flipper and accelerate again. This repeats few times, at end it is hard to hit "target".
Something like in "C" was visible, when i used xBAM.Ball.Speed instead FlipperExe.BallVSpeeed.
Smothes chart i get, even is set elasticCoef = 0. (No bounce at all), but this is not "realistic" value for this param.

8. From Left flipper i was able to do few time "slingshot pass", but it was extremly hard. I think it is beter to move little bit sligshot, or flipper, or change angle of flipper instead try to modify params and charts to make it possible.

9. Target practice for "inlane" (build in test in BAM):
https://youtu.be/2qlDjc4cTS4
On video you can see how i do "target practice" to check what is in range for flipper.
You can change ball starting position, speed, direction.
This test work like this:
1. When you press start, ball will roll. When ball "hit" flipper, BAM will simulate "button press". BAM will also count how many physics simulation frames passed from test start... and ofcource it will log ball position for 1000 ms. (one red line).

2. BAM will repeat everything from start, but next time it will press "button" given number of frames later (3 frames are default)... and repeat it few times, until it will find, that ball falls from flipper before button was pressed.

3. ... now BAM repeat everything, but button will be pressed 3 frame earlier.... and repeat until flipper will stop moving befor ball hit it.

You can check what will change, when you modify flipper mass, omega

_________________
http://www.ravarcade.pl
Better Arcade Mode
current BAM version: v1.4-240, released: Aug 16, 2018


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Sun Jul 29, 2018 12:00 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2129
Location: Ontario, Canada
Thanks Rav!
Very cool stuff!
I will try to have quick look tomorrow


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Mon Jul 30, 2018 12:19 am 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 330
Location: Abbotsford
having a quick look shortly. One thing, using the stock flippers in your example, the ball is sinking through the flippers so I will try the zed version flippers instead.

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: FPx Template Engine


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Mon Jul 30, 2018 5:26 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1702
Location: Arkansas, USA
I have never been able to figure out how to use this. How do you add points to the graph?

George


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Mon Jul 30, 2018 6:35 pm 
Offline

Joined: Mon Mar 25, 2013 4:02 pm
Posts: 930
@GeorgeH:
Go to line: "Idx: 1" and press Insert to add point, Delete to remove, left/right arrows to select point.
Example how to change from one point [0 ms, 100%] to 2 points [0 ms, 30%, 30 ms 100%]
1. Go to line "Idx: 1".
2. Press Insert on keyboard
3. Press 2 times arrow down (you should be in line "precent: 100%")
4. Enter on keyboard "30"
5. Go to line "Idx: 1".
6. Press Right arrow. You should see, "Idx: 2"
7. Press 1 time arrow down (you should be in line "time: 1.0 ms"
8. Enter on keyboard "30", you should see now "time: 30.0 ms"
Done.

One more tip for everyone:

When you are in BAM "Physics Teaks" menu and you press CTRL+C you will get in clipboard ready to past something like this:
Code:
xBAM.PhysicsXML = "" & vbcrlf &_
   "<?xml version=""1.0"" encoding=""utf-8""?>" & vbcrlf &_
   "<document>" & vbcrlf &_
   "  " & vbcrlf &_
   "  <!-- Physics processing -->" & vbcrlf &_
   "  <!-- Note. Changing the FPS will effect how how all the other values interact with each other and should " & vbcrlf &_
----------- a lot more lines with VBScript code ----------------
 

... but if you press CTRL+SHIFT+C (note SHIFT key) you will get something like this:
Code:
'=============================== PHYSICS XML ===========================
'<?xml version="1.0" encoding="utf-8"?>
'<document>

'  <!-- Physics processing -->
'  <!-- 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
----------- a lot more lines as "comment"  -----------

This you can put in sciprt.

Both are used to change physics params .... but hey are not 100% same. There are few differences:
1. CTRL+C version (as xBAM.PhysicsXML =....):
+ you can change param, run table and changes are implemented.... but
- ... no all params can set this way. Some will be still loaded from XML in FP.exe. That pramas are for example "FPS", bumper params (and all objects parms). Only BALL, FLIPPER and Materials can be set this way

2. CTRL+SHIFT+C version (as comment):
- you must save script and table to disk, before after modifications params can be loaded.
+ ... ALL params will be interpreted as normal XML

So, if you want to change FPS, FP objects params, you should use CTRL+SHIFT+C ("as comment") version.

==============================================
New BAM (v237) was released to everyone.

changes beteween v234 & v237:
1. New things of flipper "charts":
- Finall BallSpeed as result of fipper activation is displayed on chart, also "contact point"
- On charts you can see now "circles" and "big dots". Dots are just marks for frames when ball have contact with flipper.
- If you use one of tests for flipper, you may see green charts. This chart is "finall ball speed" as function of "flipper activation delay".

2. FlipperExt.BallVSpeed for _prehit subroutine in calculations take into account flipper rotation speed. This is only "aproximation", but for example if "ball hange in air above flipper" (ball speed = 0) and flipper is rotating, then you can get quite high "BallVSpeed".

Note, Finall Ball Speed is recorded before "BallSpeedLimit" is applied, so, even if you set in script speed limiti to 2300, you can easly get values above 4000.

@Gimli:
Maybe your best option is to increase speed limit and increase FPS? If you set FPS=512, you should not have problems with balls move speed near 4600?

_________________
http://www.ravarcade.pl
Better Arcade Mode
current BAM version: v1.4-240, released: Aug 16, 2018


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Mon Jul 30, 2018 7:08 pm 
Offline

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

I think I am missing something here. I used "BAM.PhysicsXML" to add XML to POTO and it has items for FPS and bumpers. Do these parameters not work?

The XML file as comment does seem to have the fail safe built into it so it seems to have an advantage to me.

George


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Mon Jul 30, 2018 7:33 pm 
Offline

Joined: Mon Mar 25, 2013 4:02 pm
Posts: 930
@GeorgeH: Yes. FPS, Bumpers params are not used.

... and XML as comment was added to BAM in 2014? 2013?

_________________
http://www.ravarcade.pl
Better Arcade Mode
current BAM version: v1.4-240, released: Aug 16, 2018


Top 
 Profile  
 
 Post subject: Re: BAM Dynamic Flipper Breakthrough !!
 Post Posted: Mon Jul 30, 2018 10:03 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 1702
Location: Arkansas, USA
OK, I won't use "BAM.PhysicsXML" anymore.

Thanks for the info.

George


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

Board index » Future Pinball » BAM corner


Who is online

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