Author |
Message |
Gimli
|
Post subject: Re: BAM Dynamic Flipper Breakthrough !! Posted: Sat May 04, 2019 8:47 pm |
|
Joined: Mon Jan 27, 2014 12:36 pm Posts: 2859 Location: Ontario, Canada
|
I think that the good ship BAM is definitely heading there Terry....We have script enabled physics , shadows, ball sounds , miniplayfields, magnets,flipper dynamics LEDwiz, DOF and Rav is working on Hi Def color DMD scripting...so lighting is the next logical hurdle...
FYI there is a BAM beta already where we can alternate the color of Monochrome DMDs, it also allows true color DMD images from a multicolored image list as well as different foreground vs background DMD color ...but the resolution is not as good as overlays yet...
This has creative potential for desktop users and appeal for cab users with a second monitor for backglass and maybe even futureDMD if GauntletLover is still breathing
|
|
 |
|
 |
djlunchbox
|
Post subject: Re: BAM Dynamic Flipper Breakthrough !! Posted: Thu Aug 01, 2019 4:20 pm |
|
Joined: Sun Mar 10, 2019 5:13 pm Posts: 177
|
Ok so i don't know if this has been reported or maybe I'm doing something incorrect.
So for the most part I run a modified 2.5 physics XML. I increase gravity, ball mass, dampening and flipper mass as well. I got it to a point where I feel it's good and I can keep my table slope @ 7.5-7.75 depending on the table.
Now with dynamic flippers added via script I think there may be some sort of interference that affects the table.
So Gimli made an amazing mod to AFM (that hopefully we can release to the public soon i wanna do a few tweaks) and he incorporated the dynamic flippers into the script. However here was my dilemma:
I normally use 7.5 for table slope, however when I launched the aFM table I noticed a significant amount of ball float. I went back to the editor and found myself increasing the slope way above 8 and almost to 9 to decrease the float. So then I removed the Dynamic Flippers portion of the script and still ran my XML and the ball float was gone.
So I'm wondering if there's something that conflicts. I notice in the script that the custom physics XML portion is blanked out so that technically shouldn't affect it however how do I need to run tables if I want to use my custom ball mass, gravity and dampening and maybe flipper mass as well?
|
|
 |
|
 |
Gimli
|
Post subject: Re: BAM Dynamic Flipper Breakthrough !! Posted: Thu Aug 01, 2019 4:26 pm |
|
Joined: Mon Jan 27, 2014 12:36 pm Posts: 2859 Location: Ontario, Canada
|
The dynamic flipper portion should not affect physics, except " maximum ball speed" comment which you can remove
The "blanked physics" portion is not blanked out that is how it looks so delete that and you should be good....
If you run the table and have an external xml file , you can go into bam physics and press I think control -C or is it shift - c and it will copy the physics code to the clipboard which you then can paste into the code so your own physics is loaded for people automatically without the xml
|
|
 |
|
 |
djlunchbox
|
Post subject: Re: BAM Dynamic Flipper Breakthrough !! Posted: Thu Aug 01, 2019 4:33 pm |
|
Joined: Sun Mar 10, 2019 5:13 pm Posts: 177
|
Hmmm ok I'll check on that maximum ball speed comment and report back.
So if I copy my physics do I add it to the script before the dynamic flippers portion?
|
|
 |
|
 |
Gimli
|
Post subject: Re: BAM Dynamic Flipper Breakthrough !! Posted: Thu Aug 01, 2019 5:11 pm |
|
Joined: Mon Jan 27, 2014 12:36 pm Posts: 2859 Location: Ontario, Canada
|
djlunchbox wrote: Hmmm ok I'll check on that maximum ball speed comment and report back.
So if I copy my physics do I add it to the script before the dynamic flippers portion? 1.Yes you , remove the xml from the code . 2.save table and exit table 3. make sure you xml file is in same place as table with same name ie Lunchbox.fpt and Lunchbox.xml 4. load table using BAM 5. enter BAM menu by pressing "Q" 6. To Dev/physics tweeks 7. Press Ctrl-Shift-C this will "copy script as comment" to clipboard 8. exit table editor and go to script 9. at top of script anywhere under "opton explicit" press control -v to paste xml into code. I usually put it before dynamic flipper code but it shouldn't matter....
|
|
 |
|
 |
GeorgeH
|
Post subject: Re: BAM Dynamic Flipper Breakthrough !! Posted: Thu Aug 01, 2019 5:32 pm |
|
Joined: Thu Aug 16, 2012 11:12 pm Posts: 2523 Location: Arkansas, USA
|
That is how I do it. You can place it anywhere in the script as long as it in not inside a subroutine. I started placing it near the beginning because I often make adjustments to this stuff in the script. Having it near the beginning makes it easier.
Be sure to hold down both the Ctrl and shift key at the same time when you press "C". If you just press Ctrl and "C", you will get something copied to the clipboard and it looks like the XML data after you paste it but it does not work right. The wrong copy pastes as red text and the correct copy pastes as green comment text.
George
|
|
 |
|
 |
GeorgeH
|
Post subject: Re: BAM Dynamic Flipper , Physics and Material Property Mod Posted: Wed Aug 21, 2019 1:55 pm |
|
Joined: Thu Aug 16, 2012 11:12 pm Posts: 2523 Location: Arkansas, USA
|
I have seen this code several times in Gimli's code but I still don't understand what it does. It looks like gibberish to me but it must do something. The best I can figure is that it produces debug text. George Gimli wrote: Ravarcade is a genius ! Dynamic coding may be the fix we have been looking for Hopefully our coders blue , Smoke , Franzleo, Popotte, flug ,Wild can help us investigate this ?Here is a reply from Rav regarding BAM ball tracking of position and direction Quote: .Here is sample code: Code: Dim RadToDeg RadToDeg = 57.295779513082320876798154814105
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
Dim prehitidx prehitidx = 0 Sub RightFlipper_prehit() prehitidx = prehitidx + 1 AddDebugText "xy: " & xBAM.Ball.Position.X & ", " & xBAM.Ball.Position.Y & " S:" & xBAM.Ball.Speed AddDebugText "vel: " & xBAM.Ball.Velocity.X & ", " & xBAM.Ball.Velocity.Y & " dir: " & Atn2(xBAM.Ball.Velocity.X, xBAM.Ball.Velocity.Y) End Sub
in xBAM.Ball you have: - Position (3d vector, but Z is probalby useless for you). It may be used to calc position relative to flipper. Like this: Code: Dim dX, dY dX = xBAM.Ball.Position.X - FlipperRight.X dY = xBAM.Ball.Position.Y - FlipperRight.Y
- GlobalPosition - same as above, but for mini-playfield. No use for you. If ball and flipper is on miniplayfield you will use only Position like above. - Velocity (3d vector, again Z is useless for you). It may help to decide if ball will hit hard flipper or is just rolling over it. See how in example i calc "direction" with Atn2 subroutine. - Speed (scalar) - this is what you ask, but i think you need to use direction too.
- HitSpeed same thing as Speed in "_prehit" subroutine. - Exist (= true or false) for ball. in "_prehit" always true
|
|
 |
|
 |
Gimli
|
Post subject: Re: BAM Dynamic Flipper Breakthrough !! Posted: Wed Aug 21, 2019 3:08 pm |
|
Joined: Mon Jan 27, 2014 12:36 pm Posts: 2859 Location: Ontario, Canada
|
I include some of this stuff when I am wanting to monitor ball and flipper physics in real time. Blue has a more comprehensive BAM monitoring system.
I use debug text to show real time monitoring whereas blue uses DMD's
This is high resolution stuff that Rav has developed for research and development...and for modders and table developers
Most of them are self evident 1. Ball position x,yz 2. Ball velocity x,y,z 3. Ball speed ( which I believe is a mathematical amalgum of 2. ) 4.Ball trajectory ( which I believe is a mathematical amalgum of 1.) 5. Flipper angles 6. Flipper contact points 7. Flipper speed (omega) 8. Ball is hit true/false
There numerous other items like gravity, elastic coefficients etc...
I used ball trajectory in MB to activate a magnet push up a stubborn ramp If ball hits a trigger while rolling in the upward direction the magnet pulses in a negative repulsive direction which pushes the ball... this is cool because I didn't want the magnet active when the ball is rolling downward
|
|
 |
|
 |
GeorgeH
|
Post subject: Re: BAM Dynamic Flipper Breakthrough !! Posted: Wed Aug 21, 2019 5:22 pm |
|
Joined: Thu Aug 16, 2012 11:12 pm Posts: 2523 Location: Arkansas, USA
|
I would be interested in trying the code that pushes the ball up a ramp if you could post it with some directions. I might have used it on Independence Day which is the most difficult table I have ever done.
George
|
|
 |
|
 |
Gimli
|
Post subject: Re: BAM Dynamic Flipper Breakthrough !! Posted: Wed Aug 21, 2019 5:30 pm |
|
Joined: Mon Jan 27, 2014 12:36 pm Posts: 2859 Location: Ontario, Canada
|
GeorgeH wrote: I would be interested in trying the code that pushes the ball up a ramp if you could post it with some directions. I might have used it on Independence Day which is the most difficult table I have ever done.
George It's on the Franky ramp of your most recent Monster Bash version
|
|
 |
|
 |
|