Jump to content




Photo
- - - - -

Physmod5 physics is just... wrong. How do I tune this thing?


  • Please log in to reply
57 replies to this topic

#21 jnovek

jnovek

    Hobbyist

  • Members
  • PipPip
  • 22 posts

  • Flag: United States of America

  • Favorite Pinball: Whirlwind

Posted 09 January 2015 - 02:15 PM

I ended up gong out to play real pinball after work last night so I didn't have much time to tweak, but I did raise the friction co-efficient on TL.  That seemed to help the "weird" behavior that I was experiencing.

 

Now I'm thinking that I need to fiddle with the flipper strength a bit.  I only have one TL that I can play as a comparison point, but I feel like the shot straight up the middle (disc war multiball?) is much easier on VP than it is IRL.  On my cab I can shoot that thing all day and I get 2x to 3x the score I do on the actual machine.

 

One thing I did notice after fiddling with the friction co-efficient was that the ball bounces around on the outlane posts in a way similar to real Stern machines.  That was pretty cool.



#22 jnovek

jnovek

    Hobbyist

  • Members
  • PipPip
  • 22 posts

  • Flag: United States of America

  • Favorite Pinball: Whirlwind

Posted 11 January 2015 - 10:55 PM

Hey guys, so this took a turn this weekend.

 

I ended up spending substantial time playing with Physmod conversions.  The flipper physics are actually pretty cool once you start getting them behave.

 

The bad news is that there seems to be like a dozen different ways that people have historically simulated flipper physics and most of them appear to be undocumented/opaque/copypasta.

 

Anyway, I've got gobs of questions about table development and modification WRT physmod -- what forum is the best place to ask them?

 

Jason


Edited by jnovek, 11 January 2015 - 10:55 PM.


#23 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 12 January 2015 - 12:23 AM

If you mean all the physics scripts like BPMR, manually adjusting flipper speeds in the script, and so on... all those should simply be removed in VP10/PM5. They were only workarounds for flaws in the VP9 physics model and hopefully aren't needed anymore.


Edited by mukuste, 12 January 2015 - 12:24 AM.


#24 gtxjoe

gtxjoe

    Pinball Wizard

  • VIP
  • 4,519 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 12 January 2015 - 01:11 AM

Posting here is fine.  I am interested in your observations.  I have a couple of physmod tables released but still learning with each one...



#25 jnovek

jnovek

    Hobbyist

  • Members
  • PipPip
  • 22 posts

  • Flag: United States of America

  • Favorite Pinball: Whirlwind

Posted 12 January 2015 - 01:37 AM

I'm still pretty deep in noob-land when it comes to the how tables are built, particularly on the scripting side.

I am a reasonably competent programmer so I'm not afraid to get my hands dirty but I'm not entirely sure how scripts like BMPR get included and applied so I don't know how to gut them on the tables I'd like to convert.

I'm thinking right now that I would like to try converting a few tables I play a lot IRL and then I'll toss them up for feedback. In particular I would love to see those new flipper physics on WW because it's a game all about ball control... :-)

#26 gtxjoe

gtxjoe

    Pinball Wizard

  • VIP
  • 4,519 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 12 January 2015 - 02:31 AM

At a high level, remove the following from the VP9.x tables

- BMPR is mainly the Momentum routines, so disable or delete that section

- Reduce flipper routines to just RotateToEnd and RotateToStart and PlaySound.  Remove any code that modifies the flipper parameters, search for "flipper."

- remove any Dampen routines or any routines that modify ball velx, vely

 

Here is a post from the BMPR author on implementing BMPR to physmod   http://www.vpforums....showtopic=29246



#27 jnovek

jnovek

    Hobbyist

  • Members
  • PipPip
  • 22 posts

  • Flag: United States of America

  • Favorite Pinball: Whirlwind

Posted 12 January 2015 - 01:41 PM

Thanks!  If I get home early enough tonight I will give it a shot.



#28 jnovek

jnovek

    Hobbyist

  • Members
  • PipPip
  • 22 posts

  • Flag: United States of America

  • Favorite Pinball: Whirlwind

Posted 13 January 2015 - 02:23 PM

I had ~an hour to do a bit more last night.

 

So the following methods appear in many tables but aren't referenced elsewhere in the script --

 

  - XYdata_Timer()

  - Collide(cb1, cb2)

  - GetAngle(Xin, Yin, vAngle)

 

I've noticed that magic interactions re: the ball's velocity happen in Collide() and it calls the other two.  Forgive me if I bungle the nomenclature, I'm not really a VB guy, but is Collide() implementing an interface or overriding a method from VP?  Are there other common overridden methods that can be stripped out in Physmod5 tables?

 

By the way, it looks like the BMPR momentum stuff has an "enabled" flag.  Thanks, whoever did that :-).

 

Jason


Edited by jnovek, 13 January 2015 - 02:25 PM.


#29 Shockman

Shockman

    Pinball Fan

  • VIP
  • 1,672 posts
  • Location:Portland Or.

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 13 January 2015 - 03:24 PM

I don't know, but just for the fun of maybe guessing right, I would guess neither calling or overwriting, but adding. Maybe in the case of Collide just a flag to use for some ball manipulation (physics enhancement).

 

That BMPR stuff is probably good, but I would suggest if you are trying to get a handle on Physmod physics that you do so without that. You can always revisit it down the road if you conclude you need to.

 

I would also suggest stripping instead of disabling the flag, because it is still going to be checked so very often, and VP physics seems best at higher FPS even if it appears smooth to your senses.


Edited by user, 13 January 2015 - 03:32 PM.

Mr. & Mrs. PAC-MAN https://www.dropbox....AC-MAN.vpx?dl=0

ICE COLD BEER,  ZEKE'S PEAK,  ICE COLD ROOT BEER  https://www.dropbox....D0IrcigG9a?dl=0

Other arcade games https://www.dropbox....LMmazmcfGa?dl=0

Arcade WIPhttps://www.dropbox....GKxYhviH_a?dl=0


#30 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 13 January 2015 - 04:20 PM

All of these three functions are defined in B2B.vbs / B2Bcollision.vbs, which are part of the common vbs scripts available to all tables (they should be in your Tables directory). These functions are only used to play a sound effect when two balls collide, they have no impact on the physics.

 

I don't know what the difference between B2B.vbs and B2Bcollision.vbs is, they seem to do the same thing and are pretty similar codewise. Probably one is a newer version of the other, and they are kept both for compatibility.


Edited by mukuste, 13 January 2015 - 04:26 PM.


#31 Shockman

Shockman

    Pinball Fan

  • VIP
  • 1,672 posts
  • Location:Portland Or.

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 13 January 2015 - 05:01 PM

I would keep that in then when I run across it, if there is no obvious or perceived hit. 


Mr. & Mrs. PAC-MAN https://www.dropbox....AC-MAN.vpx?dl=0

ICE COLD BEER,  ZEKE'S PEAK,  ICE COLD ROOT BEER  https://www.dropbox....D0IrcigG9a?dl=0

Other arcade games https://www.dropbox....LMmazmcfGa?dl=0

Arcade WIPhttps://www.dropbox....GKxYhviH_a?dl=0


#32 jnovek

jnovek

    Hobbyist

  • Members
  • PipPip
  • 22 posts

  • Flag: United States of America

  • Favorite Pinball: Whirlwind

Posted 13 January 2015 - 06:57 PM

I'm at work right now so I can't look, but at least one of these functions had logic that appeared to modify the ball velocity e.g. velx/vely assignment.  I think it was Pinbot?

 

So if I understand right, those methods are defined in B2S.vbs or B2SCollision.vbs and if those methods appear in the script it is to override the version that is provided in the included library?  If so, that's helpful.

 

I really wish that it was easy to decompress VPT files so I could edit them in vim :-).

 

By the way, regarding removing the BMPR physics... BMPR does a good job of providing the bouncy/floaty quality that EMs and early SS tables have (Centaur comes to mind) I can't get Physmod5 to do the same thing.  Is this a case where I'm just going to have to adjust all the rubbers to have appropriate bounciness?  Because if so, ugh.



#33 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 13 January 2015 - 08:12 PM

These functions are only included if the B2B.vbs script is explicitly included at the start of the table script, they don't get pulled in automatically. So it's possible that the table you were looking at simply had its own copy of those functions before B2B was standardized as a core script, or something like that. Hard to tell without seeing the script.

 

Did you see my reply in that other thread? You can decompress vpt files with 7-Zip, but I'm afraid it doesn't have an easy way to put them back together. There are also several libraries you can use to throw something together quickly, if you know some coding. I agree that the built-in script editor is rather clunky...

 

For a floaty feel, the most important setting is a low table slope, around 3-4 degrees. Rubber bounciness may help too, yes.



#34 unclewilly

unclewilly

    sofa king.....

  • VIP
  • 4,822 posts
  • Location:Baltimore, Maryland

  • Flag: United States of America

  • Favorite Pinball: tz, tom, big hurt, who dunnit



Posted 13 January 2015 - 09:59 PM

Does the getball function work in physicsmod5?

"it will all be ok in the end, if it's not ok, it's not the end"
 
Monster Bash VP10 WIP https://dl.dropboxus... (vpx)WIP15.vpx

uw2.gif


#35 jnovek

jnovek

    Hobbyist

  • Members
  • PipPip
  • 22 posts

  • Flag: United States of America

  • Favorite Pinball: Whirlwind

Posted 13 January 2015 - 11:18 PM

These functions are only included if the B2B.vbs script is explicitly included at the start of the table script, they don't get pulled in automatically. So it's possible that the table you were looking at simply had its own copy of those functions before B2B was standardized as a core script, or something like that. Hard to tell without seeing the script.

 

Did you see my reply in that other thread? You can decompress vpt files with 7-Zip, but I'm afraid it doesn't have an easy way to put them back together. There are also several libraries you can use to throw something together quickly, if you know some coding. I agree that the built-in script editor is rather clunky...

 

For a floaty feel, the most important setting is a low table slope, around 3-4 degrees. Rubber bounciness may help too, yes.

 

I did see your reply... putting them back together would definitely be a requirement :-).  It's not a big deal, I'm just whining.

 

I will have to look and see whether those vbs's are being included (probably tomorrow?).  That would make a lot of sense.

 

Jason



#36 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 13 January 2015 - 11:20 PM

Do you mean GetBalls()?

 

If so... I think I added it only in the VP10 branch, not in any physmod version.



#37 unclewilly

unclewilly

    sofa king.....

  • VIP
  • 4,822 posts
  • Location:Baltimore, Maryland

  • Flag: United States of America

  • Favorite Pinball: tz, tom, big hurt, who dunnit



Posted 13 January 2015 - 11:39 PM

Yes that one. Jp has come up with a nice positional ball collision and ball rolling sound script using the getballs function

"it will all be ok in the end, if it's not ok, it's not the end"
 
Monster Bash VP10 WIP https://dl.dropboxus... (vpx)WIP15.vpx

uw2.gif


#38 jimmyfingers

jimmyfingers

    Pinball Fan

  • VIP
  • 832 posts

  • Flag: Canada

  • Favorite Pinball: Comet



Posted 13 January 2015 - 11:43 PM

Yes that one. Jp has come up with a nice positional ball collision and ball rolling sound script using the getballs function

That won't work going backward as remember there were issues with the first few attempts at that routine (the getballs() one) in general before the builds were updated in the VP10 alphas?  It required some bug fixes to get it going so isn't going to be immediately workable in the physmod builds as they would likely have at least that issue if not even less of the code.


Edited by jimmyfingers, 13 January 2015 - 11:43 PM.


#39 mukuste

mukuste

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 854 posts

  • Flag: ---------

  • Favorite Pinball: Centaur

Posted 14 January 2015 - 01:44 PM

I still plan to implement a ball-to-ball collision event, which would call directly into some script function, for VP10. This means that both ball rolling sounds (via GetBalls()) and ball collision sounds (via this new callback) should then be very easy to do in VP10 without all the complicated B2B.vbs ball tracking code that we have now.

 

What were the issues with GetBalls() though?


Edited by mukuste, 14 January 2015 - 01:46 PM.


#40 fuzzel

fuzzel

    spaghetti code

  • VP Dev Team
  • PipPipPipPipPip
  • 2,688 posts

  • Flag: Germany

  • Favorite Pinball: yes I have

Posted 14 January 2015 - 02:11 PM

The GetBalls() function should work in the current VP10 revisions together with JP's ball collision detection and rolling sound routine. But if you plan to add this in VP9 it will need more work for sure.