Physics/XML BAM About physics ......For a better gameplay!

Ok,I take this concept of mine from a few years ago, many things have happened, Rav has created other "xbam" codes and methods to improve Fp.
xBAM.FindObject. xBAM.table.TableSlope xBAM.Physics.SetBallMaterial "Generic_prehit" and others I don't understand

Now in my other thread "XML" Arguments and Explanations I was trying to better understand XML, (values, settings, etc etc) as it affects not by a little in the gameplay of the table.
Having said that, it is from here that I would like to resume, therefore in my last post,where am I talking about mass/gravity/slope,and relying on the explanation of "smoke"...HERE where he looked for values almost to the real ones (which one supposes having them) of which these;
masss="80.0"
gravity="9810.0"
slope= 5.8/6.2

So, with these values, I've noticed a fast, and sometimes frustrating gameplay, but these values are basically assumed to be like those of a real table, but I'm still not happy with how you play,I sensed that something was missing, and I had said and asked here, but I didn't get an answer at the time, then I left everything hanging so far.

I recently resumed playing on Fp, and resumed as I said above and fiddling with physics, so taking up the thread of what I was missing, i.e. the friction of the playfield, by regulating it (together with the elasticity and the slope) you get a gameplay suited to the mass and gravity of those values.

later I will show something if everything goes well, without problems!!
 
Ok,Thank you to Rav....which here explained how to use the xBAM.FindObject function in more detail (at least for me) and add the material type, see the list.....HERE . I think this function or command is something phenomenal, especially in the hands of those who know how to use mathematics,
just see Rav's answers,page 167/173....the latter to my question, I still have to finalize it.

Now,with xBAM.FindObject i can find my playfield, this way;
Dim FpPlayfield
Set FpPlayfield = xBAM.FindObject(258.000, 534.000, 3)
the first two values are half in measure (millimeters) of playfield....I don't know why half.....are the coordinates.
Cattura1.JPG

The third value, i.e. the "3" is the type of object that finds the coordinates on the basis, in the first two values

So now i tried to fantasize, and i inserted the materials to my playfield, so that i can configure it directly and i guess overriding the xml,in this way;

Dim softnessCoef
Dim elasticCoef
Dim staticFriction
Dim kineticFriction

FpPlayfield.SetMaterial softnessCoef,elasticCoef,staticFriction,kineticFriction

softnessCoef= x
elasticCoef= x
staticFriction=x
kineticFriction=x

Now I i just need to find the right values,including also for xBAM.table.TableSlope = x
maybe if you want @JLou5641 .......

I would like to know the difference between these two
staticFriction
kineticFriction
 
Softness need to be always at 1.. Even at one surface is not stiff.. more than 1 don't work better.

ElasticCoeff, between 0.5/0.7 depend your taste. It "affect" friction also.. Due to ball polygon collision ( that make lot of micro contact bounce )

Static and kinetic, same value. For pinball you can consider it's the same. By the way, easier to tune like that.

For a ball, static friction is the factor which represente the force to make ball begin to slide. And kinetic is the dragging force wich want to make a sliding ball to roll
 
...
Set FpPlayfield = xBAM.FindObject(258.000, 534.000, 3)
the first two values are half in measure (millimeters) of playfield....I don't know why half.....are the coordinates.
View attachment 38858
Because the coordinates are based on the center of PF (like bumpers, ...).
 
Last edited:
Softness need to be always at 1.. Even at one surface is not stiff.. more than 1 don't work better.
Ok,so to 1....just to better understand, if it is at this value 0.15, what happens? it's worse?

ElasticCoeff, between 0.5/0.7 depend your taste. It "affect" friction also.. Due to ball polygon collision ( that make lot of micro contact bounce )
Ok,thanks.
Static and kinetic, same value. For pinball you can consider it's the same. By the way, easier to tune like that.
ok.
For a ball, static friction is the factor which represente the force to make ball begin to slide. And kinetic is the dragging force wich want to make a sliding ball to roll
oO and what values should they be? i assume like your xml.....0.025..?
....so if I increase this value I have more friction, right?

@JLou5641 @Popotte
do you think this works?

xBAM.Physics.SetBallMaterial FpBall

Set FpBall = xBAM.FindObject("ball")

FpBall.SetMaterial newtonDamping,mass,gravity,damping

Dim FpBall
Dim newtonDamping
Dim mass
Dim gravity
Dim damping


newtonDamping= 0
mass= 80.0
gravity= 9810.0
damping= 0.8
 
Ok,so to 1....just to better understand, if it is at this value 0.15, what happens? it's worse?
it's worst and can make the ball stuck


oO and what values should they be? i assume like your xml.....0.025..?
....so if I increase this value I have more friction, right?
minimum 0.015
maximum 0.03
higher mean more friction


do you think this works?
nope like that. Another stuff wich is on FizX. A feature from my request
 
euuh . like it's explain on the BAM update topic... or in FizX code
 
From the forum main page follow BAM sub forum

 
you see it.. i answer on it, and i answer you on it too few minute ago
sorry but I do not understand.....
did you answer me??? ok, but I don't see the link where is this mentioned?
xBAM.Physics.SetBallMaterial FpBall

Set FpBall = xBAM.FindObject("ball")

FpBall.SetMaterial newtonDamping,mass,gravity,damping

Dim FpBall
Dim newtonDamping
Dim mass
Dim gravity
Dim damping


newtonDamping= 0
mass= 80.0
gravity= 9810.0
damping= 0.8
you say this is on BAM update topic... or in FizX code

regarding in fizx code, i don't think i will understand something, and even if i would understand it i doubt i can use it..... would you let me use it....I do not believe......am i wrong?

in bam update topic as you suggest, I ask you if you could give me the direct link of where it is mentioned, so I don't waste hours looking for it, also because I don't know how it is explained and if I look for it I don't know what to look fo.
 
From the topic of v360:

xBAM.Physics.SetBallMaterial elasticCoef, softnessCoef, staticFriction, kineticFriction
You change material for ALL balls for ball-vs-ball collisions.

So there is nothing to explain..
Did you pay attention it only affect when ball hit another ball?


regarding in fizx code, i don't think i will understand something, and even if i would understand it i doubt i can use it..... would you let me use it....I do not believe......am i wrong
are you serious?
if you don't understand fizx code, so you won't understand all new physics BAM feature from each update..
FizX is for everyone.. There is nothing to understand. Just C&P
All you need is in, and all customisable option are explained, and if you read it seriously, you could make your own gameplay as you wish
 
Lou....
I'm probably explaining myself badly, up to page 158 there was talk of friction etc etc
then i asked if the same way what did I do ,could be used for

newtonDamping
mass
gravity
damping

and you told me no, and i asked you how i should do
 
aaaah.. So yes barrier language make me misunderstood.

NewtonDamping, mass, gravity, damping are set in XML

You can set ball mass and damping in script, easy for ball mass when you create a ball... more complexe for damping.

Ball damping in script was added recently from my request, to add momemtum absorption when ball hit something... Cause FP has lack of momemtum absorption..
But finally i made ball momemtum by manually set ball spinning after hit exactly like scatter trajectory... It's a part of the new BAM code of damping in script

So damping need to be set on XML ( if you want a good damping, take a real ball, make it spin on a good surface, measure the time she spin... then do the same in game..
 
NewtonDamping, mass, gravity, damping are set in XML
Yes I know, and usually we are all used to change it from there, as I really liked the way to set these types of codes like these
Cattura11.JPG
at the beginning of the script, putting a few lines of explanation and that's it, instead of going to xml, which maybe a beginner like me, could do something wrong.

So damping need to be set on XML
Ok, so as you explain it's better just in xml
Regarding the NewtonDamping, as I could see it is better not to touch it, as a test I had put 1, when I then opened the table, the ball went in slow motion (it reminded me of the TV series the six million dollar man)

Ball damping in script was added recently from my request, to add momemtum absorption when ball hit something... Cause FP has lack of momemtum absorption..
But finally i made ball momemtum by manually set ball spinning after hit exactly like scatter trajectory... It's a part of the new BAM code of damping in script
Wow...
So you've created a system that you can insert into the various gameplay situations of the various elements that the ball hits, am I right? therefore in xml damping is involved in all gameplay situations of the table, your system overrides the xml and configures it according to......???? let's see if I guess right... this "momemtum absorption" did I guess right?
that you put in some super processed code, I wonder what it is? even if I look for it I don't think I would find it, I don't even know how and what it is:bonk:

easy for ball mass when you create a ball.
So for mass you say you did it,but I didn't see the setting?

So gravity remains, is it possible to create a code that we can change it without going into xml?

I had tried (in my math inability) to replicate your system, see page 157, but as you say and that I have also tried it doesn't work.

I assume Newton Damping, mass, gravity, damping...can't be created in order to configure them apart from in xml,because they are not material(for ball) so I don't know....
xBAM.Physics.SetBallMaterial FpBall
Set FpBall = xBAM.FindObject("ball")
FpBall.SetMaterial newtonDamping,mass,gravity,damping

I wonder what category nominations they are?
 
Just use FizX for God's sake.
 
Last edited:
@Paolo , no time to answer this weekend. Let me answer monday or tuesday
 
Ok, so as you explain it's better just in xml
Regarding the NewtonDamping, as I could see it is better not to touch it, as a test I had put 1, when I then opened the table, the ball went in slow motion (it reminded me of the TV series the six million dollar man)
Exactly. Newton Damping always need to be set at 0
For ball damping, to make it simple, it like the counterforce that make the ball spin speed slown down until she stop spinning.
To find 0.5, I tried to measure the time a ball that I turned with my hand on a coated wood like a playfield. If you set 0, is like ball turn in the space like Earth, Sun, Jupiter etc etc... with no atmosphere friction... She never stop spining... So 0.5 seems to be good value... 0.2 to 0.5 could be a good range. ALso, less ball damping you set, more momemtum she kept when she roll. By the past, setting it at 1 avoid overspin.... Now it's not needed anymore with FizX


Wow...
So you've created a system that you can insert into the various gameplay situations of the various elements that the ball hits, am I right? therefore in xml damping is involved in all gameplay situations of the table, your system overrides the xml and configures it according to......???? let's see if I guess right... this "momemtum absorption" did I guess right?
that you put in some super processed code, I wonder what it is? even if I look for it I don't think I would find it, I don't even know how and what it is:bonk:
Did you look at the vide on the FizX Private discussion?
Yes, i emplemented this. For now it's almost basic. The reason is I put same absorption factor on every case for now. Second reason, it's due to FP lack of physics when ball hit something, it not always deflect the ball bounce trajectory in every situation. So I set a value wich work the most better as possible for all scenario. In the future, i plan to solve this FP issue, and make dynamic absorption wich will deflect bounce trajectory in every case. But It's not my focus.. The first objectif of this first version of Momemtum absorption was to avoid overspin.
Combined to the "scatter bounce" feature, it should make very impredicible bounce trajectory in the future
For now, it at least always overspin in all situation. Which was a big issue.

Look at the "Generic_Hit" for xBAM.BallsetOmega.....




So for mass you say you did it,but I didn't see the setting?

So gravity remains, is it possible to create a code that we can change it without going into xml?

I had tried (in my math inability) to replicate your system, see page 157, but as you say and that I have also tried it doesn't work.

I assume Newton Damping, mass, gravity, damping...can't be created in order to configure them apart from in xml,because they are not material(for ball) so I don't know....
xBAM.Physics.SetBallMaterial FpBall
Set FpBall = xBAM.FindObject("ball")
FpBall.SetMaterial newtonDamping,mass,gravity,damping

I wonder what category nominations they are?

Nope, i didn't say i did it. I said it's easy.. But there is no reason to set it in script as it always be a static value... and only interact with all other element which have mass settings... More you increasse ball mass, more you need to increase all other mass in same scale..
But higher the value are, better the game is, and set it in XML is the better.

Just for exemple... i find which value is need to make game working good with no scripted Omega for flipper...
If i set ball mass to 8000, flipper need to be set between only to 5000/10000 depend to flipper omega set in XML... But for now, we can't use like this, due to another FP issue i can't solved for now.. So forget it, it was just an exemple.

Finally, 8000 for ball is "THE" good the value as you will have better scale accuracy for all other mass element, and also give more momentum to the ball travel on PF ( like taking a ramp ).. It's slightly but it's better...

So for mass you say you did it,but I didn't see the setting?

So gravity remains, is it possible to create a code that we can change it without going into xml?

I had tried (in my math inability) to replicate your system, see page 157, but as you say and that I have also tried it doesn't work.

I assume Newton Damping, mass, gravity, damping...can't be created in order to configure them apart from in xml,because they are not material(for ball) so I don't know....
xBAM.Physics.SetBallMaterial FpBall
Set FpBall = xBAM.FindObject("ball")
FpBall.SetMaterial newtonDamping,mass,gravity,damping

I wonder what category nominations they are?

- Gravity can't be set in script ( from my knowledge ).. Only in XML. I can ask rav to add this, but there is no good reason for that..

- Page 157?? from which thread?

- For the ball material, just use like this on the root of your script

xBAM.Physics.SetBallMaterial "your ball eleasticity coeff" ( no need to set softness and friction )

Ex: xBAM.Physics.SetBallMaterial 0.8




Now need to come back to my work.
 
Last edited:
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
  • Chat Bot Mibs Chat Bot Mibs:
    eathearty has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    dieg44720 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    leestecher has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    swaggedgamer777 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Arnold101 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    MoFloh has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Jthemad has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Fredrick has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    lilalien has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Clu1968 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    manalpa has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    katywings has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Jonte67swe has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    ernaoqds has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    HotPinkCenter has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    remoberserkerxxx has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    holymoses has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Carla has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Zoran_ST has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    evandrogleide has joined the room.
  • Chat Bot Mibs Chat Bot Mibs:
    evandrogleide has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Utnapistim has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    matteo_grop has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    PrettyGood has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Stoobie has left the room.
      Chat Bot Mibs Chat Bot Mibs: Stoobie has left the room.
      Back
      Top