Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » Tables WIP




Post new topic Reply to topic  [ 630 posts ]  Go to page Previous  1 ... 58, 59, 60, 61, 62, 63  Next
Author Message
 Post subject: Re: Monster Bash
 Post Posted: Sun Jul 08, 2018 12:36 pm 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 331
Location: Abbotsford
Thanks Rav. Boy, am I going to be busy the next little while. :)

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: FPx Template Engine


Top 
 Profile  
 
 Post subject: Re: Monster Bash
 Post Posted: Wed Jul 11, 2018 12:27 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2150
Location: Ontario, Canada
https://www.dropbox.com/s/tk96zghzzc7t5 ... c.rar?dl=0

Above is a demo of monster bash (again Flug has the actual working version)
you must use the enclosed Bam.dll (which is the current beta) to run this demo.
All the other companion files (smokes ball rolling code and the monster bash library files
are enclosed and should be put in the appropriate folders or in same folder as table is put)

Code:
Sub OnPreHitFlipperSettings(FlipperExt)
'   OnPreHitFlipperSettings_weekTip(FlipperExt)
   'OnPreHitFlipperSettings_linearOmega(FlipperExt)
   'OnPreHitFlipperSettings_mass(FlipperExt)
   OnPreHitFlipperSettings_linearElasticCoef(FlipperExt)

'  ---- versions with some debug info when you press F9 instead of F5
'  OnPreHitFlipperSettings_weekTip_debug(FlipperExt)
   'OnPreHitFlipperSettings_linearOmega_debug(FlipperExt)
   'OnPreHitFlipperSettings_mass_debug(FlipperExt)
   OnPreHitFlipperSettings_linearElasticCoef_debug(FlipperExt)
End Sub


I have tweaked the physics as follows:
1. I added George's physics xml as the internal physics file
but I add Rav's Flipper Acceleration code to it
2. I tweaked the table for 3 types of dynamic physics
The default dynamic physic is for Dynamic Elasticity based on the Flipper Contact Point
The second one is Dynamic Flipper Omega based on the Flipper contact point
The third one is Dynamic Flipper Mass based on the Flipper Contact point

To Switch between these simply add and remove apostrophe before line.
In code above you see this line has no apostrophe
Code:
OnPreHitFlipperSettings_linearElasticCoef(FlipperExt)

therefore Elasticity is the active physic...

Assumptions (probably wrong) :lol:

1. base of flipper (contact point closer to zero) needs more power/speed/elasticity
2.tip of flipper (contact point closer to 1) needs less power/speed/elasticity

All the above demo's are based on these assumptions.

*Note: there seems to be a glitch with the Dynamic Omega Physic when you hold the ball with the left flipper (it does crazy stuff....)

Anyways, I think there is lots of potential , and we can tweak the numbers as we go... :lol:
We can run a similar demo using flipper angles, friction or whatever and can have combinations of all these things. But for now, it seems wise to assess one thing at time...


Top 
 Profile  
 
 Post subject: Re: Monster Bash
 Post Posted: Fri Jul 13, 2018 11:05 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2150
Location: Ontario, Canada
Keep up to speed with on going physics enhancements here:

viewtopic.php?nomobile=1&f=86&t=6676


Top 
 Profile  
 
 Post subject: Re: Monster Bash
 Post Posted: Mon Jul 23, 2018 8:28 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2150
Location: Ontario, Canada
https://www.dropbox.com/s/tk96zghzzc7t5 ... c.rar?dl=0

Here is an updated demo only version (Flug has working version of table)

Here is what I am experimenting with:
1. I removed all the other examples from from Rav's demo script template, in this table so you can see what I am working on (not so confusing for non-scripters).
Play game in Debug mode (press F9 from table editor to load game in debug mode)
if you use Ball Roller and move ball over flipper you will see Ball Speed before hit, Contact point , and the adjusted flipper omega


2. I have set the ball speed limiter at 2300
Code:
xBAM.BallSpeedLimit = 2300


3. There are separate prehit routines for each flipper (although in this case almost identical)
Code:
Sub RightFlipper_prehit()
   BallSpeedBeforeHit = xBAM.Ball.Speed

   AddDebugText "BallSpeedBeforeHit: " &  BallSpeedBeforeHit

   ' All actions are based on BallSpeedBeforeHit
   ' 0  - 99
   If BallSpeedBeforeHit < 200 then
      AddDebugText "FlipperExt.Omega: " &  RightFlipperExt.Omega
      omegaCorrection = 50 - RightFlipperExt.ContactPoint * 20
      If omegaCorrection > 40 then omegaCorrection = 45
      If omegaCorrection   < 25 then omegaCorrection = 20
      If RightFlipperExt.ContactPoint > .3 then
         RightFlipperExt.Omega = omegaCorrection
         AddDebugText "Contact Point: " &  RightFlipperExt.ContactPoint
         AddDebugText "omegaCorrection: " &  omegaCorrection
      End if
      AddDebugText "[A]"
      Exit Sub  ' we exit subroutine here when we don't addjust Omega & Maxx
   ' 100.0 - 199
   ElseIf BallSpeedBeforeHit < 300 Then
         AddDebugText "FlipperExt.Omega: " &  RightFlipperExt.Omega
      omegaCorrection = 40 - RightFlipperExt.ContactPoint * 20
      If omegaCorrection > 40 then omegaCorrection = 45
      If omegaCorrection   < 25 then omegaCorrection = 20
      If RightFlipperExt.ContactPoint > .3 then
         RightFlipperExt.Omega = omegaCorrection
         AddDebugText "Contact Point: " &  RightFlipperExt.ContactPoint
         AddDebugText "omegaCorrection: " &  omegaCorrection
      End if
      AddDebugText "[B]"
      Exit Sub  ' we exit subroutine here when we don't addjust Omega & Maxx
      
   ' 200.0 - 599
   ElseIf BallSpeedBeforeHit < 600 then
      RightFlipperExt.Mass      =      (xRightFlipperMass*1.2) '2000
      RightFlipperExt.Omega     =       (xRightFlipperOmega/1.15) '40
      AddDebugText "[C]"
   ' 600 - 899
   ElseIf BallSpeedBeforeHit < 900 then
      RightFlipperExt.Mass      =      (xRightFlipperMass*1.1)
      RightFlipperExt.Omega     =       (xRightFlipperOmega/1.1) '25
      AddDebugText "[D]"
   ' 900 - 1199
   ElseIf BallSpeedBeforeHit < 1200 then
      RightFlipperExt.Mass      =      (xRightFlipperMass)
      RightFlipperExt.Omega     =       (xRightFlipperOmega/1.05) '25
      AddDebugText "[E]"
   ' 1200 - 1999
   ElseIf BallSpeedBeforeHit < 2000 then
      RightFlipperExt.Mass      =      (xRightFlipperMass)
      RightFlipperExt.Omega     =       (xRightFlipperOmega) '25
      AddDebugText "[F]"
   ' 2000 - 2249
   ElseIf BallSpeedBeforeHit < 2250 then
      RightFlipperExt.Mass      =      (xRightFlipperMass*1.1)
      RightFlipperExt.Omega     =       (xRightFlipperOmega/1.1) '25
      AddDebugText "[G]"
   ' 2250 - 2499
   ElseIf BallSpeedBeforeHit < 2500 then
      RightFlipperExt.Mass      =      (xRightFlipperMass*1.2)
      RightFlipperExt.Omega     =       (xRightFlipperOmega/1.15) '25
      AddDebugText "[H]"
   ' 2500 - 2749
   ElseIf BallSpeedBeforeHit < 2750 then
      RightFlipperExt.Mass      =      (xRightFlipperMass*1.3)
      RightFlipperExt.Omega     =       (xRightFlipperOmega/1.2) '25
      AddDebugText "[I]"
   ' 2750 - infinity
   Else
      RightFlipperExt.Mass      =      (xRightFlipperMass*1.4)
      RightFlipperExt.Omega     =       (xRightFlipperOmega/1.3) '25
      AddDebugText "[J]"
   End If
   AddDebugText "Adjusted Omega: " &  RightFlipperExt.Omega
   AddDebugText "Adjusted Mass: " &  RightFlipperExt.Mass
End Sub


4. I am attempting a blend of flipper dynamics that takes BOTH Ball Speed AND Contact point into consideration.

If BallSpeed (which I called BallSpeedBeforeHit) is less than 200 then flipper dynamics (just flipper omega actually) are adjusted according to flipper contact point

If BallSpeed (which I called BallSpeedBeforeHit) is greater than 200 then flipper dynamics (flipper omega and mass) are adjusted according to BallSpeedBeforeHit using blue's flipper template

5. also in the Frankenstein ramp I am experimenting with a Bam Magnetic field to push the ball up
the ramp instead of using 3 kickers as before

There obviously still some glitches ( I am not sure it is adjusting based on higher speeds
as the debug result for flipper mass is always the same...)

It does seem to play much better and I think we may be onto something cool :lol:


Last edited by Gimli on Tue Jul 24, 2018 9:25 am, edited 7 times in total.

Top 
 Profile  
 
 Post subject: Re: Monster Bash
 Post Posted: Mon Jul 23, 2018 8:54 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2150
Location: Ontario, Canada
The most confusing part of my script above is likely this:

Code:
omegaCorrection = 50 - LeftFlipperExt.ContactPoint * 20
      if omegaCorrection > 40 then omegaCorrection = 45
      if omegaCorrection   < 25 then omegaCorrection = 20
      If LeftFlipperExt.ContactPoint > .3 then
         LeftFlipperExt.Omega = omegaCorrection


I will attempt to explain this....and you will understand if play in debug mode and use ball roller and move ball over flipper.

Debug mode will show you the contact point number.
Rav calls the base of the flipper "P0" and it equals 0
and he calls the tip "P1" and it equals 1

so the middle of the flipper therefore is 0.5

You will notice however that sometimes debug mode shows you contact points that are less than zero , in the inlane

and sometime debug mode shows contact points that are greater than 1 as the ball rolls over tip of flipper.

We will have to account for these. See Below number 3 and 4


1. My goal is to have the flipper omegas higher at the base of flipper and lower at the tip. this is accomplished by this
Code:
omegaCorrection = 50 - LeftFlipperExt.ContactPoint * 20

This is an arbitrary formula I came up with


2.Applying the Flipper Omega Correction
Code:
If LeftFlipperExt.ContactPoint > .3 then
         LeftFlipperExt.Omega = omegaCorrection

In the case above I decided that I wanted anything from 0 to 0.3 to use the xml default
Flipper Omega (so I didn't apply the "omega correction" here)
So number 3. below likely is redundant here

However, I want the "omega correction" applied to contact points > .3 (that is more than 0.3 to the tip of flipper 1.0)

3. accounting for Contact point readings that are less than 0
Code:
if omegaCorrection > 40 then omegaCorrection = 45

I want my max omega to be 45.

4. accounting for Contact point readings that are greater than 1
Code:
if omegaCorrection   < 25 then omegaCorrection = 20

I want my minimum omega to be 20

Therefore the above code applies:
1. omega speed between 20-45 with the highest speeds at the base and lowest ones at tip.

Again you will see these values during debug mode...


Top 
 Profile  
 
 Post subject: Re: Monster Bash
 Post Posted: Mon Jul 23, 2018 11:37 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2150
Location: Ontario, Canada
Link above updated.
Rav helped clean up the code for me...


Top 
 Profile  
 
 Post subject: Re: Monster Bash
 Post Posted: Tue Jul 24, 2018 2:09 am 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 331
Location: Abbotsford
Niice work. I see you are using my code, but you dont need the RightFlipper2, LF or RF code as they are hidden flippers in my game.

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: FPx Template Engine


Top 
 Profile  
 
 Post subject: Re: Monster Bash
 Post Posted: Tue Jul 24, 2018 8:00 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2150
Location: Ontario, Canada
oops, I forgot to remove those entries....link updated
https://www.dropbox.com/s/tk96zghzzc7t5 ... c.rar?dl=0

It should be noted that I am just showing possibilities, the numbers I have chosen are totally
arbitrary and fully open to tweaking...

The other thing I am experimenting with, is using a BAM magnetic field to push the ball up the franky ramp with different magnet strengths based on ball speed.

If you press "V" on keyboard you will only need to hit Frankenstein target once (cheat code)
and "B" is the cheat code to turn on phantom flippers...

Code:
If xBAM.Ball.Speed < 500 then 
      MagneticField_0.Strength = -40
   Elseif BallSpeedBeforeHit < 1000 then 
   MagneticField_0.Strength = -30
   Else
   MagneticField_0.Strength = -20
   End if
   AddDebugText "xBAM.Ball.Speed: " &  xBAM.Ball.Speed
   AddDebugText "MagneticField_0.Strength: " &  MagneticField_0.Strength


Top 
 Profile  
 
 Post subject: Re: Monster Bash
 Post Posted: Thu Jul 26, 2018 6:00 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2150
Location: Ontario, Canada
https://www.dropbox.com/s/tk96zghzzc7t5 ... c.rar?dl=0
Updated link with the Dynamic physics that I currently like.

It uses:
1. Rav's Bounce Control
2.George's XML from Phantom of Opera he is working on
3.Dynamic Flippers omega changes based on contact point only

Once again this is demo version (Flug has working version)
Although I did tweak a couple of things for fun.
1.Franky was not working during monsters of rock or monster bash
2.The ball was spending too much time after lauch in upper bumpers
3.During mosh mode the saveball light was on for too long...

Again if you launch table from table editor by pressing F9 you will be in debug mode and you will see
how contact point and bounce control works...


Top 
 Profile  
 
 Post subject: Re: Monster Bash
 Post Posted: Sun Jul 29, 2018 5:15 pm 
Offline

Joined: Thu Nov 24, 2016 7:46 pm
Posts: 137
OK mate, I just tested the table for a couple of minutes. First of all, I am pretty much impressed how good it is looking and working. I think we cant thank you enough for the time you spent on it. The good news is, that the flipper physics feel much better than they used to feel on other tables. But to be honest, the physics are still far from perfect. I am confident that we find proper settings here. The ball physics are completey messed up in my opinion. Ball is way too slow, seems to float around sometimes and bounces off targets and walls pretty wierd. And I think we need an additional parameter here. The ball doesnt seem to change its speed, while it is rolling. But it should get faster, as longer as it rolls down the playfield (i.e.). VP is in another league here. Hopefully we (when I say we I mean Rav, of course ;) ) do find a solution for this. Something is wrong on the rotation part as well. The ball is rolling so strange, it almost looks like the table has a slope to the right. Have to find out what is wrong here.

The table itself is working pretty good, but I things are still wrong here. I just heard some sounds that dont belong to this table. And some animation look a bit wierd as well. Will make a list soon and let you know.

I played MB in real life yesterday, and it was exciting again. I want to help you to create an experience that is as close as possible to the original.


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 630 posts ]  Go to page Previous  1 ... 58, 59, 60, 61, 62, 63  Next

Board index » Future Pinball » Tables WIP


Who is online

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