Tutorial Physics/XML "XML" Arguments and Explanations

I will check next week if i can create better solution.
Thanks Rav.

@Popotte
So have you found a way to make the spinner spin based on the strength and speed of the ball when it is hit?
 
Well, more or less. The problem is not really the number of turns you can do, but to have a spinner well positionned at the end.
I try with normal physic, with the tables who send me Ravarcade and AnonTet ( @AnonTet thank you), with my table. Sometimes, you get an
impracticable spinner...
Second problem: I test with a good big speed. Now, I have to manage that with normal and/or slow speed.
For the moment, I'm here: from left to right, my solution, original physic normal damp, original physic the more you can have. I don't think I can do more, because strange things happen when you struggle with parameters (spinner spins but all the spinner spin also :rasta: )
 

Attachments

  • Spinner.jpg
    Spinner.jpg
    21.6 KB · Views: 64
I don't want to overthink this much and I did not test anything myself other than a quick experiment but, we just need the spinner to spin the "right" amount of turns to the score be realistic in a table, right?

My "dilemma" is between:

- is it better to have a more realistic movement and probably less score for the spinner (and in some tables it can big quite a big difference)?
- is it better to have a not so natural movement (very fast at beginning so it has time to add score with an abrupt stop) but a more accurate score?

In any case, this current possibility of changing the angular damping on the fly already helped me :)
 
It's very easy with the future BAM version to change in the fly the angular damping, but the problem is the end of spinning. Event if the spinner makes only 2 turns, it can ended in an erratic position.
And it's stange, low angular help to spin but after a certain amount of angular damping it help too (infinite spinning)
 
I noticed that and the faster you get it to spin the higher the value it is needed to stop it and in a timely manner too (like in that williams table example). Can the erratic stop position be solved by forcing a higher .mass right before increasing angularDamping to stop the spin?

Possible solution: set a ballSpeedLimit for a predefined angulardamping values?

I just thinking out loud.
 
I tried mass and gravity with insane values. No change. BallSpeedLimit is useless as I assign a minimum angularDamping.
And if you vary some parameters by 0.01, you have big changes...
 
Spinners are not quite centered on the spindle. I guess the idea is for the mass to be high enough so the off centered weight will make it return to vertical. I have rarely but occasionally had a ball hit a spinner so it was not vertical and it was angled just right so the ball hit the bottom of the spinner and the ball bounced off.

I played my version of Space Shuttle many times. I never had a problem with the spinner not being fairly close to vertical. It didn't spin as many times as I would have liked when it was hit though.

I have an idea. Try adjusting the height of the spinner. I have a feeling that height will affect the number of spins.
 
Last edited:
Spinners are not quite centered on the spindle. I guess the idea is for the mass to be high enough so the off centered weight will make it return to vertical. I have rarely but occasionally had a ball hit a spinner so it was not vertical and it was angled just right so the ball hit the bottom of the spinner and the ball bounced off.
Mass doesn't affect really the spinner. And yes, the spinner is not centered and I have no problem for one half of it.
I played my version of Space Shuttle many times. I never had a problem with the spinner not being fairly close to vertical. It didn't spin as many times as I would have liked when it was hit though.

I have an idea. Try adjusting the height of the spinner. I have a feeling that height will affect the number of spins.
Yes, height of the spinner affect not only the number of spins, but also the behaviour. 28-29 mm seems the good height.
 
I seem to understand that the spinner still cannot be configured at its best ....

honestly it is not clear to me yet, how you would like it, I still think that for the moment in toys is the best choice, especially that now it is possible to spin it as many times based on the speed of the ball when hits it (in this case a trigger ) .... in toy it is easy to reposition it vertically, and decide in which part front or back,when you stop it
maybe it won't be real, because it doesn't oppose any resistance to the ball, but maybe in that trigger could add some code that slows the ball a little .....

in my opinion a spinner, to work well, apart from all types of configuration that could be made ...... mass, angular damping, damping, and whatever you want, you have to hit it from below(see pics) and not centrally...so the height would be 33, and not 28/29
now we could also change a spinner to milkshape, change the "front" bigger or as you see fit, and change the bar a little higher...to make it more efficient (I believe)

Future Pinball 2021-04-21 15-17-08-20.jpgFuture Pinball 2021-04-21 15-16-46-76.jpg
 
Last edited:
beta BAM v.331
Inside is small demo.

Last time i give way to get object to control mass, damping and material params of any object in FP. Also object without give name, like peg or rubber.

Now i added "Generic_prehit". You can add that subroutine to script and get notification before that object get hit.
In attached demo in script we monitor 4 objects: left/right flippers, peg-rubber and peg-plastic.
In that Generic_prehit subroutine as argument you get "object". You can easly check if that object is one of that 4 monitored objects.

Important thing:
Like all "prehit" subrotines it is called not when ball hit, but when ball may hit. So, not always ball will hit tracked object
 

Attachments

  • BAM.zip
    2 MB · Views: 86
Many thanks,rafal...thank you for continuing to improve fp things, via bam ....

Ok, i don't know if @Popotte him managed to find an optimal configuration, for the spinners, (if yes, I'd like to see), however I started fiddling with physics again, on a couple of tables, already made previously and published in pinsim ..... .I would like to publish them here too, but still despite all the configurations and tests, I am not satisfied with the game play, despite being a very simple table an "EM".

I also replaced the main slings, ie those above the fins, with emkickers, someone said that they are an excellent solution, but for me they are not as I expected .... maybe I am wrong something? the emkickers can be directional, adjust the strength, but I always push the ball in the same direction, I have inserted 4, so how could it be better than the slings? the sling pushes the ball according to the strength / speed of the ball....... (short note, "strength and speed", are correlated like "space and time", I don't know if I have been clear)and consequently we see the direction of the ball different, it is not always the same as in the emkickers, unless you put a timer and change the direction (in script,the comand is "rotate" bla bla) of the emkicker, not know if it can be done, for a kicker yes, done in my different tables .

So in terms of physics, I think it's almost impossible, to have gameplay, at least as I mean it, I've made many attempts .... I don't know how it does,@GeorgeH in his mods, he tells me that he makes a lot of changes, here and there, until he finds a configuration that is good for him ..... but I have some doubts about this way.

I believe that it is almost impossible to have a gameplay, at least like that of vpx, unfortunately as I said also here
IMO, unfortunately it is not enough just to act, in the construction of a table (which I, no offense to anyone, am very good) or to change something in the xml ..... the real problem is the physics engine that uses fp .. .... it would be nice if you could change the type of engine, but I think it's impossible
 
Last edited:
So in terms of physics, I think it's almost impossible, to have gameplay, at least as I mean it, I've made many attempts .... I don't know how it does,@GeorgeH in his mods, he tells me that he makes a lot of changes, here and there, until he finds a configuration that is good for him ..... but I have some doubts about this way.

I once tried to figure out what all the terms mean in the XML but it didn't help. I ended up just experimenting. It involves increasing a parameter, trying it and deciding if you like the change. If you don't like it, change it back to what it was or decrease the value of the parameter and try again. I have found that trial and error like this is the only method that works. I am not crazy about doing it this way but it is the only method that works for me.

I have been using emKickers on slingshots. They do have a stronger kick that the rubber. You said you use 4 kickers. I only use 3 kickers like Shiva used on Jungle Girl. I think the only table I have done that you might be able to play is Space Shuttle that has 3 kickers.
 
I once tried to figure out what all the terms mean in the XML but it didn't help. I ended up just experimenting. It involves increasing a parameter, trying it and deciding if you like the change. If you don't like it, change it back to what it was or decrease the value of the parameter and try again. I have found that trial and error like this is the only method that works. I am not crazy about doing it this way but it is the only method that works for me.
I tried this too, but it is almost impossible to understand, and do it alone......there is also a fact that you have surely noticed it too, even if you change the values of certain objects, then when you try them it seems to have no effect or change...
there are too many things that do not fit together, you try to fix one thing and in the meantime another fails,the real problem is (Newton engine) of fp.

@TerryRed ,here says,that bam, it could somehow solve it but i have my doubts IMO it doesn't just take intelligence, but also something out of the ordinary.
 
I said that Newton is still FP's limiting factor.... but I also said that many of the tricks used on VP to get better physics could also be applied to FP, but someone needs to translate that somehow to make it happen with BAM. Not for "all" physics... I was more referring to the flippers.
 
I said that Newton is still FP's limiting factor.... but I also said that many of the tricks used on VP to get better physics could also be applied to FP, but someone needs to translate that somehow to make it happen with BAM. Not for "all" physics... I was more referring to the flippers.
yes I understand, and I believe the others too .....but,but i think it's not just the fins or flippers,I believe that bam, he can do this and more, but it takes the right men for this difficult job.
 
Bene!! these are the values that according to "smoke" calculations, are those found in real pinballs, ok ....

masss="80.0"
gravity="9810.0"
slope= 5.8

is anyone able to do a specific calculation as of friction?

' <playfieldMat softnessCoef="xxx" elasticCoef="xxx" staticFriction="xxx" kineticFriction="xxx"></playfieldMat>

EDIT:

obviously based on those values of mass and gravity, above

Thanks in advance
 
Last edited:
Last param Type is set to -1, because you (and i) don't know type of object.
@ravarcade
First thanks always for Bam.....so with this command I find an object on the table.... xBAM.FindObject ok.
but if you know the object, what should you put?

Ok, maybe wrong question, I'll say it in another way.... with xBAM.FindObject I find the object in the table, and also allows you to enter the type of material for that object(I seem to understand) set with and I put the coordinates of the object ok..... in this case, for now I'd like to understand about the playfield....so?

Dim FpPlayfield : Set FpPlayfield = xBAM.FindObject 258.000, 534.000, X?

These are the coordinates of my playfield,(I don't know what to put in the third command I put X)
Now this command xBAM.FindObjec it gives you the possibility to insert also the type of materia?,type, plastic, wood, metal,etc...
I would be interested in the friction and elasticity of the playfield, and have a code to adjust the values
So how do I insert the elasticity and the friction?, obviously with their values of which I can set

FpPlayfield.SetMaterial...and what?
 
If you want to search existing objects with xBAM.FindObject first add at begin of script command:
xBAM.DumpAllObjectInfo
1693211729844.png

run table, wait to start of script, open any test editor and use CTRL-V.
You will get something like this:
Code:
Dim PO_1 : Set PO_1 = xBAM.FindObject(258.000, 534.000, 3)
Dim PO_2 : Set PO_2 = xBAM.FindObject(258.000, 0.000, 16)
Dim PO_3 : Set PO_3 = xBAM.FindObject(0.000, 534.000, 16)
Dim PO_4 : Set PO_4 = xBAM.FindObject(258.000, 1068.000, 16)
Dim PO_5 : Set PO_5 = xBAM.FindObject(516.000, 534.000, 16)
Dim PO_6 : Set PO_6 = xBAM.FindObject(258.000, 534.000, 11)
Dim PO_7 : Set PO_7 = xBAM.FindObject(22.000, 496.000, 28)
Dim PO_surface5 : Set PO_surface5 = xBAM.FindObject("surface5") ' //Dim PO_8 : Set PO_8 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_surface4 : Set PO_surface4 = xBAM.FindObject("surface4") ' //Dim PO_9 : Set PO_9 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_surface10 : Set PO_surface10 = xBAM.FindObject("surface10") ' //Dim PO_10 : Set PO_10 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_surface11 : Set PO_surface11 = xBAM.FindObject("surface11") ' //Dim PO_11 : Set PO_11 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_surface9 : Set PO_surface9 = xBAM.FindObject("surface9") ' //Dim PO_12 : Set PO_12 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_surface8 : Set PO_surface8 = xBAM.FindObject("surface8") ' //Dim PO_13 : Set PO_13 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_14 : Set PO_14 = xBAM.FindObject(358.480, 751.179, 28)
Dim PO_15 : Set PO_15 = xBAM.FindObject(258.000, 534.000, 27)
Dim PO_surface7 : Set PO_surface7 = xBAM.FindObject("surface7") ' //Dim PO_16 : Set PO_16 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_surface18 : Set PO_surface18 = xBAM.FindObject("surface18") ' //Dim PO_17 : Set PO_17 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_18 : Set PO_18 = xBAM.FindObject(106.520, 751.179, 28)
Dim PO_19 : Set PO_19 = xBAM.FindObject(115.957, 747.121, 27)
Dim PO_20 : Set PO_20 = xBAM.FindObject(376.000, 779.500, 20)
Dim PO_21 : Set PO_21 = xBAM.FindObject(124.222, 801.222, 20)
Dim PO_22 : Set PO_22 = xBAM.FindObject(89.000, 701.000, 20)
Dim PO_23 : Set PO_23 = xBAM.FindObject(258.000, 534.000, 7)
Dim PO_24 : Set PO_24 = xBAM.FindObject(483.000, 757.333, 16)
Dim PO_25 : Set PO_25 = xBAM.FindObject(258.000, 534.000, 4)
Dim PO_leftflipper : Set PO_leftflipper = xBAM.FindObject("leftflipper") ' //Dim PO_26 : Set PO_26 = xBAM.FindObject(258.000, 534.000, 24)
Dim PO_rightflipper : Set PO_rightflipper = xBAM.FindObject("rightflipper") ' //Dim PO_27 : Set PO_27 = xBAM.FindObject(258.000, 534.000, 24)
Dim PO_surface6 : Set PO_surface6 = xBAM.FindObject("surface6") ' //Dim PO_28 : Set PO_28 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_surface35 : Set PO_surface35 = xBAM.FindObject("surface35") ' //Dim PO_29 : Set PO_29 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_30 : Set PO_30 = xBAM.FindObject(376.500, 701.000, 20)
Dim PO_31 : Set PO_31 = xBAM.FindObject(340.714, 801.286, 20)
Dim PO_32 : Set PO_32 = xBAM.FindObject(89.000, 779.000, 20)
Dim PO_33 : Set PO_33 = xBAM.FindObject(376.500, 700.929, 20, 32.983)
Dim PO_34 : Set PO_34 = xBAM.FindObject(340.643, 801.214, 20, 32.983)
Dim PO_35 : Set PO_35 = xBAM.FindObject(124.214, 801.214, 20, 32.983)
Dim PO_36 : Set PO_36 = xBAM.FindObject(88.786, 700.929, 20, 32.983)
Dim PO_guide1 : Set PO_guide1 = xBAM.FindObject("guide1") ' //Dim PO_37 : Set PO_37 = xBAM.FindObject(258.000, 534.000, 20)
Dim PO_guide2 : Set PO_guide2 = xBAM.FindObject("guide2") ' //Dim PO_38 : Set PO_38 = xBAM.FindObject(258.000, 534.000, 20)
Dim PO_guide3 : Set PO_guide3 = xBAM.FindObject("guide3") ' //Dim PO_39 : Set PO_39 = xBAM.FindObject(258.000, 534.000, 20)
Dim PO_guide4 : Set PO_guide4 = xBAM.FindObject("guide4") ' //Dim PO_40 : Set PO_40 = xBAM.FindObject(258.000, 534.000, 20)
Dim PO_drain : Set PO_drain = xBAM.FindObject("drain") ' //Dim PO_41 : Set PO_41 = xBAM.FindObject(258.000, 534.000, 8)
Dim PO_42 : Set PO_42 = xBAM.FindObject(259.000, 1016.000, 4)
Dim PO_43 : Set PO_43 = xBAM.FindObject(259.000, 1016.000, 17)
Dim PO_plungerkicker : Set PO_plungerkicker = xBAM.FindObject("plungerkicker") ' //Dim PO_44 : Set PO_44 = xBAM.FindObject(258.000, 534.000, 8)
Dim PO_45 : Set PO_45 = xBAM.FindObject(441.250, 917.000, 4)
Dim PO_46 : Set PO_46 = xBAM.FindObject(441.250, 917.000, 17)
Dim PO_plungerlanegate : Set PO_plungerlanegate = xBAM.FindObject("plungerlanegate") ' //Dim PO_47 : Set PO_47 = xBAM.FindObject(258.000, 534.000, 5)
Dim PO_48 : Set PO_48 = xBAM.FindObject(258.000, 534.000, 1)
Dim PO_49 : Set PO_49 = xBAM.FindObject(485.000, 312.917, 6)
Dim PO_50 : Set PO_50 = xBAM.FindObject(483.000, 929.167, 13)
Dim PO_51 : Set PO_51 = xBAM.FindObject(89.000, 718.000, 20)
Dim PO_52 : Set PO_52 = xBAM.FindObject(109.000, 789.000, 20)
Dim PO_53 : Set PO_53 = xBAM.FindObject(376.000, 718.000, 20)
Dim PO_54 : Set PO_54 = xBAM.FindObject(356.000, 789.000, 20)
Dim PO_55 : Set PO_55 = xBAM.FindObject(258.000, 534.000, 21)
Dim PO_56 : Set PO_56 = xBAM.FindObject(9.480, 254.969, 12)
Dim PO_57 : Set PO_57 = xBAM.FindObject(506.282, 258.449, 12)
Dim PO_58 : Set PO_58 = xBAM.FindObject(257.871, 140.454, 12)
Dim PO_surface29 : Set PO_surface29 = xBAM.FindObject("surface29") ' //Dim PO_59 : Set PO_59 = xBAM.FindObject(258.000, 534.000, 20)
Dim PO_60 : Set PO_60 = xBAM.FindObject(404.000, 763.000, 13)
Dim PO_surface3 : Set PO_surface3 = xBAM.FindObject("surface3") ' //Dim PO_61 : Set PO_61 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_62 : Set PO_62 = xBAM.FindObject(419.000, 780.125, 12)
Dim PO_63 : Set PO_63 = xBAM.FindObject(419.000, 703.000, 12)
Dim PO_64 : Set PO_64 = xBAM.FindObject(419.000, 741.563, 12)
Dim PO_65 : Set PO_65 = xBAM.FindObject(436.000, 790.000, 13)
Dim PO_righinlane : Set PO_righinlane = xBAM.FindObject("righinlane") ' //Dim PO_66 : Set PO_66 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_leftinlane : Set PO_leftinlane = xBAM.FindObject("leftinlane") ' //Dim PO_67 : Set PO_67 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_68 : Set PO_68 = xBAM.FindObject(63.000, 763.000, 13)
Dim PO_69 : Set PO_69 = xBAM.FindObject(28.000, 790.000, 13)
Dim PO_surface62 : Set PO_surface62 = xBAM.FindObject("surface62") ' //Dim PO_70 : Set PO_70 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_surfaceapron : Set PO_surfaceapron = xBAM.FindObject("surfaceapron") ' //Dim PO_71 : Set PO_71 = xBAM.FindObject(258.000, 534.000, 12)
Dim PO_72 : Set PO_72 = xBAM.FindObject(22.000, 496.000, 20)
Dim PO_leftslingshotsurface : Set PO_leftslingshotsurface = xBAM.FindObject("leftslingshotsurface") ' //Dim PO_73 : Set PO_73 = xBAM.FindObject(258.000, 534.000, 20)
Dim PO_rightslingshotsurface : Set PO_rightslingshotsurface = xBAM.FindObject("rightslingshotsurface") ' //Dim PO_74 : Set PO_74 = xBAM.FindObject(258.000, 534.000, 20)
This way you will get example how to find every object on table.
Last argument for xBAM.FindObject is type of objects.
Type is value between 0 .. 34
Incomplete list of materials:
2 - ball
3 - playfield
7 - plunger
8 - drain/kicker
9 - ramp (?)
10 - spinner (?)
12 - metal
16 - wood
20 - plastic
24 - rubber hard
28 - rubber inter
32 - rubber soft
Values +1 or +2 are very parts of detectors, so you will be able to find objects
Above list may contains errors.
 
Fantastic, all clear, just a question.... After having to Set the values of the playfield, how can Insert the friction and elasticity, of the playfield? I thought it was a material..... It takes some kind of code?
 
@Paolo , did you really check on eye to FizX? Because what you ask, answer you need are in FizX.

So for playfield, then just use .setmaterial like usual for flipper or other object.
 
Bene!! these are the values that according to "smoke" calculations, are those found in real pinballs, ok ....

masss="80.0"
gravity="9810.0"
slope= 5.8

is anyone able to do a specific calculation as of friction?

' <playfieldMat softnessCoef="xxx" elasticCoef="xxx" staticFriction="xxx" kineticFriction="xxx"></playfieldMat>

EDIT:

obviously based on those values of mass and gravity, above

Thanks in advance
8000 for mass and 9810 for gravity are the good value.

I made ball drop test on pf and measuring speed impact.. The speed impact measured in FP is the same as the speed impact i calculated myself on paper. So if you want another gameplay, just change Slope and PF friction.
 
Last edited:
@JLou5641
I'm surprised....... I don't want to be rude but I will answer you later.
 
@JLou5641
I can also be wrong......but most likely you didn't read my last post HERE from the other day......or you would not have answered me now in this thread(above)....Privately you told me your point of view, and I told you mine.
The other "guys" have been very clear in their points of view, so I'm going to stick with my points of view.

did you really check on eye to FizX?
I have to be honest with myself, yes I searched a few days ago.
Because what you ask, answer you need are in FizX.
Yes I saw it, but......
So for playfield, then just use .setmaterial like usual for flipper or other object.
Yes that was what I wanted to know about the xBAM.FindObject , and Rav was very nice to answer me.
80 for mass and 9810 for gravity are the good value.
Yes I knew it since "smoke" also talks about it, and also because they are value (supposedly) like in the real ones.
I made ball drop test on pf and measuring speed impact.. The speed impact measured in FP is the same as the speed impact i calculated myself on paper.
For me it is almost impossible to understand these calculations, but nobody denies your great work.
So if you want another gameplay,
In fact I want to find my optimal gameplay with these value.
just change Slope and PF friction.
Yes, just find a good relationship between the two.

So having said all that, I always thank you for your post.
 
can also be wrong......but most likely you didn't read my last post HERE from the other day......or you would not have answered me now in this
I read it, and read more than you think on your thread.


Yes I knew it since "smoke" also talks about it, and also because they are value (supposedly) like in the real ones.
I just confirmed that is the good value and explain why with a free fall test of ball.
So it confirm the engine is not so bad


For me it is almost impossible to understand these calculations, but nobody denies your great work

Nothing difficult or understand... We learn this in physics at school around at 15/16 years old.. Just few minute on Google and you find it




chute-libre.png



g = gravity
h = height of free fall
V = Impact speed





In fact I want to find my optimal gameplay with these value.
we know, and this is why you can change many setting in FizX that FP don't have natively..

@TerryRed use is own setting, @GeorgeH too, we never forced anyone to use specific value..
 
I read it, and read more than you think on your thread.



I just confirmed that is the good value and explain why with a free fall test of ball.
So it confirm the engine is not so bad




Nothing difficult or understand... We learn this in physics at school around at 15/16 years old.. Just few minute on Google and you find it




View attachment 38857



g = gravity
h = height of free fall
V = Impact speed






we know, and this is why you can change many setting in FizX that FP don't have natively..

@TerryRed use is own setting, @GeorgeH too, we never forced anyone to use specific value..

Are you saying that 80 for mass and 9810 for gravity is OK to use for ball parameters in the XML?
 
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.
      JonPurpleHaze @ JonPurpleHaze: Ok, keep in touch!
      Back
      Top