Tutorial Physics/XML "XML" Arguments and Explanations

smoke said:
(infinite mass for flippers or else they move !!)

Not sure I understand this. Most of the tables I have the flipper's mass is set ~20000 and the flippers don't move (with ball mass at 80, gravity 9800). Actually, there's a piece of code by Rav specifically to allow that slight movement if ball hits the flipper too hard and simulate the real pinball flippers.
 
Yes, flippers move -> Flippers move (10:20 to 11:20 for example)
 
I used Rav's code in Jungle girl fpx. The flippers when fully up have a very slight movement when struck by a high speed ball, but it's very rare (like the actual pinball games)
 
Not sure I understand this. Most of the tables I have the flipper's mass is set ~20000 and the flippers don't move (with ball mass at 80, gravity 9800). Actually, there's a piece of code by Rav specifically to allow that slight movement if ball hits the flipper too hard and simulate the real pinball flippers.
change the flipper mass to 2 and see what happens.
You will understand what I mean (It was way,2-3 years?, before rav's fix)
 
Yes, flippers move -> Flippers move (10:20 to 11:20 for example)
I know, which is why I've found "the flippers move" weird. They're supposed to.

I used Rav's code in Jungle girl fpx. The flippers when fully up have a very slight movement when struck by a high speed ball, but it's very rare (like the actual pinball games)
The BAM Code section in Jungle Girl (well, the original I have has a few more things but i'm using yours, adapted) is the one I mentioned.

change the flipper mass to 2 and see what happens.
You will understand what I mean (It was way,2-3 years?, before rav's fix)
Now it makes sense and I should've though of the time frame.
 
--only gravity and ball mass are from real world (in grams and millimeters) and used table slope 5.8->6.2 (in real world average is 6.0)
Perfect!!I just wonder if I put the highest slope what happens?

--the rest is only a matter of taste and fix for the physics engine

and this is precisely what is difficult to do.....but it looks like you did it somehow ..... your xml, which i got from "ghostbusters" this below
'=============================== PHYSICS XML ===========================
'<?xml version="1.0" encoding="utf-8"?>
'<document>
' <physics slope="5.9" fps="420" threaded="1"></physics>
' <ball newtonDamping="0" mass="160" gravity="9810" damping="0.8"></ball>
' <flipper
' rotationSpeedChart="{0.0,1.0},{5.0,5.0},{9.0,11.7},{12.0,30.0},{17.0,100.0}[0.0,0.0],[10.0,10.0],[15.0,30.0],[20.0,100.0]"
' newtonDamping="0.01"
' releaseOmega="24"
' mass="99999" omega="45" moeMethod="0"
' leftXoff="0" leftYoff="1500" leftZoff="0"
' rightXoff="0" rightYoff="1500" rightZoff="0"></flipper>
' <bumper impulse="130.0" impulseRandomness="10" vectorRandomness="6"></bumper>
' <autoplunger mass="99999.0" force="60000.0"></autoplunger>
' <diverter mass="99999.0" omega="33.0"></diverter>
' <gate mass="0.005" gravity="2500.0" damping="0.25"></gate>
' <kicker impulse="1250.0" vukImpulse="2500.0" impulseRandomness="0" vectorRandomness="0"></kicker>
' <plunger mass="99999.0" force="25000.0"></plunger>
' <slingshot impulse="600.0" impulseRandomness="20" vectorRandomness="5"></slingshot>
' <spindisk mass="499.0" angularDamp="0.33" linearDamp="0.25"></spindisk>
' <spinner mass="99999.0" gravity="9810.0" angularDamp="0.5" angularAccel="5.25"
' spinDampLoose="0.30" spinBackLoose="0.70"
' spinDampNorm="0.40" spinBackNorm="0.70"
' spinDampTight="0.70" spinBackTight="0.70"></spinner>
' <emkicker mass="99999.0" omega="100.0"></emkicker>
' <varitarget mass="100.0" damping="0.5" tension="3.0" return="15.0"></varitarget>
' <magnet impulse="10.0" impulseRandomness="2"></magnet>
' <nudge impulse="190.0" impulseRandomness="15.0" warningLevel="250" leftAngle="60" upAngle="0" rightAngle="320"
' vectorRandomness="20" visualDistance="2" waitPeriod="300" maxBallVelocity="1000.0"></nudge>
' <defaultMat softnessCoef="0.15" elasticCoef="0.1" staticFriction="0.92" kineticFriction="0.92"></defaultMat>
' <playfieldMat softnessCoef="0.15" elasticCoef="0.25" staticFriction="0.02" kineticFriction="0.015"></playfieldMat>
' <metalMat softnessCoef="0.15" elasticCoef="0.2" staticFriction="0.02" kineticFriction="0.01"></metalMat>
' <plasticMat softnessCoef="0.15" elasticCoef="0.2" staticFriction="0.02" kineticFriction="0.01"></plasticMat>
' <woodMat softnessCoef="0.15" elasticCoef="0.2" staticFriction="0.02" kineticFriction="0.01"></woodMat>
' <rubberHardMat softnessCoef="0.1" elasticCoef="0.5" staticFriction="0.11" kineticFriction="0.1"></rubberHardMat>
' <rubberIntMat softnessCoef="0.1" elasticCoef="0.6" staticFriction="0.11" kineticFriction="0.1"></rubberIntMat>
' <rubberSoftMat softnessCoef="0.1" elasticCoef="0.7" staticFriction="0.11" kineticFriction="0.1"></rubberSoftMat>
' <gateMat softnessCoef="0.15" elasticCoef="0.24" staticFriction="0" kineticFriction="0"></gateMat>
' <kickerMat softnessCoef="0.15" elasticCoef="0.24" staticFriction="1" kineticFriction="0.8"></kickerMat>
' <rampMat softnessCoef="0.15" elasticCoef="0.05" staticFriction="0.01" kineticFriction="0.001"></rampMat>
' <plungerMat softnessCoef="0.15" elasticCoef="0.55" staticFriction="0.15" kineticFriction="0.1"></plungerMat>
' <spindiskMat softnessCoef="0.15" elasticCoef="0.2" staticFriction="1.5" kineticFriction="2"></spindiskMat>
'</document>
'=============================== PHYSICS XML ===========================

and everything changed, so I think you, since you @smoke say here in black
but the goal was to use the exact same physics for all tables that is close to reality.

All the changes you made, you made them with a particular criterion right? precisely because you can use them for all your tables ..... so I think it's an xml made with the aim of being closer to physics than the real one ...
basically it is my same purpose, and why I opened this thread ..... my big problem is; as I said in my introduction on the first page, I probably won't be the man for this task, but I can be the man to start this one.

I'm glad you started something like this too

I you go to the old forum where I posted my research, you have some explanation of my choices

yes I have seen it, but it is not easy to understand certain things, it would be enough for me to know and have an xml, which can be used in all the tables, without making further special changes.....

so i ask you, can your xml be a template that all tables can use?

even if I need some answers from you .... for example

these changes are just right,if in a table they are used "dymnic flippers"?
' <flipper
' rotationSpeedChart="{0.0,1.0},{5.0,5.0},{9.0,11.7},{12.0,30.0},{17.0,100.0}[0.0,0.0],[10.0,10.0],[15.0,30.0],[20.0,100.0]"
' newtonDamping="0.01"
' releaseOmega="24"
' mass="99999" omega="45" moeMethod="0"

then you saw rav's post here, could it be a factor you could consider, to improve your xml?
 
Last edited:
when i'm saying the flipper move. I mean the flipper totally goes off .
like its rotating axle breacks and the flipper goes down to the draining .
put a mass off 2 and you will see that the flipper slides down when hit by the ball an goes quickly back to its Y position.
 
@wild for the physics I let you do you own research :p
but my physics are good for table slope 5.8->6.2
 
when i'm saying the flipper move. I mean the flipper totally goes off .
like its rotating axle breacks and the flipper goes down to the draining .
put a mass off 2 and you will see that the flipper slides down when hit by the ball an goes quickly back to its Y position.

I understand. I remember having that problem after mistyping the mass for flippers :)
 
for the physics I let you do you own research :p
research is not enough, you need to have a particular preparation for these things ... which I don't have

everyone try by trial and error,examples..... I regulate this, I regulate that other, I put the mass like this, I put gravity in another way, for every table that one has in his hands at that moment.....with the result that at every table you go crazy to create something that just gives an illusion of the best physics for that table.

an example confirming what I say is: the attempts of "slam" and "zendonius", which you then find in bam,which Rav, entered

Catturaoo.JPG
and then explains here
Future Pinball has been undeservedly labelled as having bad physics. However, some really smart people have found a way to modify the rules of physics built into the game. They have released unofficial modified versions of Future Pinball. Unfortunately, in order to properly use the new better physics, you need to modify tables and to play different tables with different physics rules. You needed a few different FP versions. Now, BAM gives you a way to use one version of FP for all physics versions.

but my physics are good for table slope 5.8->6.2
@smoke
if your physics works at slope 5.8-> 6.2, that's not a problem .... if the consequence is: that it works for every table, as you did and used for all your tables ..... and as we all know, the your tables are great, nobody complains about your physics ... so I have to think that your physics is the best around

Ok....I will use it on DK, I want to see what happens
 
ok, i tried the xml, of "smoke" in Dragon's Keep ... and it's really amazing .... even if it has high mass and gravity,
' <ball newtonDamping="0" mass="160" gravity="9810" damping="0.8"></ball>

the "slope" which would seem low, does not have a negative effect, on the contrary I found a good speed in the gameplay
' <physics slope="5.9" fps="420" threaded="1"></physics>

obviously, there are lines that I don't understand, but it's interesting to see how this xml plays .... the ball seems to flow almost without strong friction....maybe it depends on it
' <playfieldMat softnessCoef="0.15" elasticCoef="0.25" staticFriction="0.02"

I noticed a detail, (but maybe I'm wrong) ... I don't know if smoke has used it in another way, maybe an external file, I don't know .... but it seems that the ghostbusters table, does not use "dynamic flippers "....and therefore I have see a configuration like below in black.
unfortunately incomprehensible to me, I can't explain what all those values are, in brackets......if anyone can, they are welcome.

' <flipper
' rotationSpeedChart="{0.0,1.0},{5.0,5.0},{9.0,11.7},{12.0,30.0},{17.0,100.0}[0.0,0.0],[10.0,10.0],[15.0,30.0],[20.0,100.0]"
' newtonDamping="0.01"
' releaseOmega="24"
' mass="99999" omega="45" moeMethod="0"

' leftXoff="0" leftYoff="1500" leftZoff="0"
' rightXoff="0" rightYoff="1500" rightZoff="0"></flipper>

in blue, it should be noted that there are those values that according to some theories are not suitable for the "dynamic flipper" ... I never understood why in an xml generated a long time before, create numerical values, but now if you generate an xml, those values are all 0 ...was it a Rav update?

note that almost all the masses are at "99999.0", or in another value such as gate or spindisk, I don't know why, but they seem to work fine .....but,I have to test the gate and spinner, another table of mine in an EM, to see if they work better
' <gate mass="0.005" gravity="2500.0" damping="0.25"></gate>
' <spinner mass="99999.0" gravity="9810.0" angularDamp="0.5" angularAccel="5.25"
' spinDampLoose="0.30" spinBackLoose="0.70"
' spinDampNorm="0.40" spinBackNorm="0.70"
' spinDampTight="0.70" spinBackTight="0.70"></spinner>

as for the kickers, I discovered it is then suggested by popotte, that if I increase the value of this in black, I get more pushing force ..... I didn't know about this before, or I don't ask the Rav, to put it inside the script .... the other parameters and values are a mystery to me, i don't know what they are

' <kicker impulse="1250.0" vukImpulse="2500.0" impulseRandomness="0" vectorRandomness="0"></kicker>
 
kicker impulse - how fast the ball will leave the kicker.

vuk impulse = same for vertical up kickers

impulse randomness = makes impulse not to be exactly the same. i think if it is 100 the impulse is calculated like "impulse=impulse +- 100. I never tested this. It might be interesting in some situations like kickers sending the ball to the flippers with more or less impulse. It adds realism to the table but more importantly, avoids memorizing shots so the player needs to be more aware.

vectorRandomness = the angle that the ball is shot varies +- according to the value, I think. so, if you set it to 5 and the kicker is set at 90º by default, it'll seend the ball between 85º and 95º - again, never tested specifically

Anyone else's opinions are welcome.
 
VukImpulse: same as kicker but for vertical kicker
ImpulseRandomless: your impulse vary ramdomly (it's à percentage I think. For exemple, impulse = 100 and randomless = 5, your impulse will be between 95 and 105.
vectorRandomless: same but for angle. If your angle is 45 and your randomless 3, your ball will be ejected with an angle between 42 and 48.
 
Would be nice to confirm if values for randomness are absolute or percentage.
In any case it the purpose is explained. It's just a matter of testing
 
As I dont know, you have just to test...
 
ok,new question, this line, can it somehow affect Dynamic Flippers?
the values are those of standard xml,,,,,

' <flipper rotationSpeedChart="{0.0,100.0}[0.0,100.0]" newtonDamping="1" releaseOmega="18" mass="20000" omega="33" moeMethod="0"

smoke, he totally changed this line,(see abosve) and for me it is almost impossible to understand why, but one thing I know, he maybe doesn't use Dynamic Flippers ..... so he found this configuration .... but I wonder what kind configuration is suitable for dynamic flipper.

suggestions are appreciated
 
New BAM beta v330

This give some low level physics engine params to tweek from script.
There is command: xBAM.FindObject.
Until now it expected 3 params: X, Y, Type. X & Y are just position on table, Type is integer value object type.
Now you can also call this function with one param: FP Script Object (as string or as object name).
Few simple examples:
Code:
Dim FLeft : Set FLeft = xBAM.FindObject(LeftFlipper)
Dim FRight : Set FRight = xBAM.FindObject("RightFlipper")
So, with this command you can have access to any FP object with name or without name if you know coords of that object.

Now, what you can do with object you get:
- you can get or set mass
- get or set lineardamping
- get or set angulardamping
Like this:
Code:
Dim sp : Set sp = xBAM.FindObject(spinner)
sp.mass = 2
sp.angulardumping = 0.1
So, now you can have spinners on table with different mass or damping.
This feature is not limited to spinners, you can change params of any objects, balls too.

In zip there is may spinner counter demo. I used it to change damping and masses of 3 first spinners.
 

Attachments

  • BAM.zip
    2 MB · Views: 72
Yes! I'm not in my home, so I can't test.
But good tempo as tomorrow it's my birthday.
Just, for the moment, one question. You have as parametet linear damping, but this parameter does not exist for spinner. Does I have to read angular acceleration?
Many thanks!
 
Many thanks Rav.
 
Yes! I'm not in my home, so I can't test.
But good tempo as tomorrow it's my birthday.
Just, for the moment, one question. You have as parametet linear damping, but this parameter does not exist for spinner. Does I have to read angular acceleration?
Many thanks!
I belive linear-damping is for moving object on table (like punger or ball, position will change, object has velocity) and angular-damping is for rotation (like spinner or flipper). Spinner will not move, so linear-damping is useless.
Ball for example can move & rotate. Both angular and linear damping will be used.
 
So, with this command you can have access to any FP object with name or without name if you know coords of that object.
@ravarcade
so also on a rubber? like this
Cattura88.JPG

if I would like this rubber, when it is hit by the ball at high speed and force, can I regulate its reaction?

I mean if every action corresponds to a reaction of equal strength and speed ... I would like this rubber to have a reaction of at least less than half
 
OK. First tests done.
Spinner mass and spinner gravity have no effects.
I have to crawl deeper with spinDamp and spinLoose, but it seems that they have no effects too.
angularDamp have a massive effect. But you have to change its value from turn to turn.
For the moment, I'm here -> Testing spinner
Not perfect. See here (at about 1'45". OK, Williams spinner are the best) -> Grand Prix spinners
More news soon (I hope).
Thanks Ravarcade!
@ravarcade
 
OK. First tests done.
Spinner mass and spinner gravity have no effects.
I have to crawl deeper with spinDamp and spinLoose, but it seems that they have no effects too.
angularDamp have a massive effect. But you have to change its value from turn to turn.
For the moment, I'm here -> Testing spinner
Not perfect. See here (at about 1'45". OK, Williams spinner are the best) -> Grand Prix spinners
More news soon (I hope).
Thanks Ravarcade!
@ravarcade
Spinner mass have big effect on ball speed after collision and if spinner is heavier in relation to ball mass it will rotate less times. I tested it on my test table with 3 spinner hit in row. If you set spinner mass low (like =2) ball will fly thru all spinner and all will rotate similiary, but if you set spinner mass high (like = 90) ball will not always reach 3rd spinner.
 
@ravarcade
so also on a rubber? like this
View attachment 19529

if I would like this rubber, when it is hit by the ball at high speed and force, can I regulate its reaction?

I mean if every action corresponds to a reaction of equal strength and speed ... I would like this rubber to have a reaction of at least less than half
Yes, you can control that rubber, but it will be tricky.
First you need to select it with xBAM.FindObject but you need to give coords.
Try at first time something like this:
Code:
Dim rb : Set rb = xBAM.FindObject 135, 483, -1
Last param Type is set to -1, because you (and i) don't know type of object.
Now you can change that single rubber params:
Code:
rb.SetMaterial 1.5
SetMaterial have 4 params: elasticCoef, softnessCoef, staticFriction, kineticFriction (like params in XML).
Value above 1.0 will increas ball speed after hit.
Now, tricky part. You can't use preHit event for that rubber, but you can in NewtonPhysicsTick subroutine find closest ball to that rubber and use rb.SetMaterial to adjust params for ball speed.

I will check next week if i can create better solution.
 
Spinner mass have big effect on ball speed after collision and if spinner is heavier in relation to ball mass it will rotate less times. I tested it on my test table with 3 spinner hit in row. If you set spinner mass low (like =2) ball will fly thru all spinner and all will rotate similiary, but if you set spinner mass high (like = 90) ball will not always reach 3rd spinner.
I totally agree with you. I'm only speak about the spinner itself (number of turns, ...).
Obviously, the heavyer the spinner is, the slower is the ball after.
 
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