shivaDynamic flippers example 1

shiva

Administrator
Staff member
Site Supporters
As we all know, Future Pinball just sucks with physics, even with BAM. The biggest problem is because there are just not enough defined physics within Future Pinball to actually do the job properly, and those that are there are just set wrong. With the flippers especially, the ball angle coming of the flipper is completely FUBARED, (which my shivaFlippers get around) but the other annoying thing is the constant strength (or Omega) of the flipper. Even a brief flick of the flipper a single degree shots the ball like a cannon sometimes, and backhands are terribly unrealistic.

As you all know, I have been working on a improvement to this. I showed a couple video examples (https://pinballnirvana.com/forums/i...-fpx-preview-release.18223/page-2#post-125164) a couple days ago, and you can see my new flippers doing very un-fp like things, so I decided to show a brief demo of the various settings of the new shivaDynamic flippers (to debut in the Next release of Jungle Girl fpx) with the new variable coil strength feature. This new feature takes the MaxOmega, divides the MaxOmega with the amount of steps you input, and then uses that value to increase the strength of the flipper with each step. There is also a Minimum Omega you can set just for a slow ball roll down a flipper so you can "flick" the ball to the other flipper.

I set the left flipper for this example to have a variable omega (strength) for the first 26 degrees of angle of the flipper swing before it reaches it's maximum strength, and then demonstrate how the various minimum omega values to "flick" the ball affects the future pinball flippers . At the end, I show a quick play of how the variable coil strength plays compared to the unmodified right flipper. (JG will be set to 12-14 steps)

You can set the amount of angles the flipper will swing to it's maximum strength (or Omega) (LeftFlipperSwingAngleEnd). A very low value will speed up the shots, while a higher value really slows the speed of the shots, and causes the flippers to be a bit sluggish and drags the ball. Jungle Girl has a maximum swing of 52 degrees, so a setting of 26 for the left flipper means there are 26 different omega values, each getting stronger for each higher angle. At the last example in the video, you will notice at the end the ball does drag the flipper a bit due to the amount of steps, but the shots are still accurate with a full flip, and you can see the ball loft a bit with the left flipper compared to the right if you press and release the flipper button before the flipper reaches it's full swing. Reducing the amount of steps (LeftFlipperSwingAngleEnd) decreases this effect, but also decreases your ability to "loft" the ball as well. This is very dependent on your reflexes and whether you are using a cabinet or your keyboard.

The second setting I use is the LeftFlipperMinimumOmega. This is a forced omega value for the flipper till it hits a higher omega value with a step, and then switches off and lets the variable coil strength system take over. In other words, if you set 10 as the LeftFlipperMinimumOmega, the flipper will never be at a strength below 10 omega. This is used exclusively for the tip of the flipper, and to do "flick passes", but this does not affect the MinOmega any other time. For the maximum speed of the ball needed for this "flick" feature, I have a third variable, SetFlickMaxBallSpeed, for this. In the code, I check if the speed of the ball is LESS than SetFlickMaxBallSpeed, check the position of the ball, and if it is a slow ball engage the "flick" feature. In the video, you will see a very low omega will work fine to fick the ball from one flipper to another, but at the cost of the flipper being very sluggish with the weight of the ball on it.

When JG 1.1 is released, you can customize your flippers to the behavior you want just by changing these 2 main variables for each flipper. This is highly experimental, so one of these days I will see if I can make this system work better.

 
Last edited:

Isaac Sauvage

Meep!
Site Supporters
Consultant
This all sounds pretty dope!

And I wonder... is BAM also capable of adding physics functionality like this, or does that moreso just extend graphics and such?
 

Isaac Sauvage

Meep!
Site Supporters
Consultant
Btw, similar to how we listed @Gimli's billiards WIP in resources, I think it would be pretty cool to do one for a demo upon your new flippers.

More people need to see this in action IMO, with an aim towards more FP tables making a big leap like this.
 

shiva

Administrator
Staff member
Site Supporters
Yeap, I will have to re-write the code to make it better, and a far bit simpler so people will be able to use it. I decided to do this because I was playing around with it yesterday and promply buggered it up... If it could be written in such a way that it could be folded in with the DynamicFlippers code, means people could update tables pretty quickly and the various things my flippers do are such a significant improvement. The problem is it's not simple. This uses FP and BAM, but I trick the physics into doing what I want it to do more than anything. Last night, I had a idea though, and if a higher end scripter with model experience can help or at least answer a couple quick questions, maybe if possible find someone to help out and do it.

I was thinking if I could replace my wall method with a custom flipper with the shape of that wall added as a collision to the flipper, that would make it a lot easier for one. Is that possible? My walls have that hook in it, and that is to get around FP's bad fault of making the angle of the ball coming off too extreme the closer to the flipper tip with a button press. It also helps shots be visually more "right" and has a wider range of shots from the center to the side of the table. I tried doing this myself but every time I use the fpm editor it crashes on me, but I'm not sure if we could even do a collision mesh properly. (We could do it as a straight rectangle though, with one end of the mesh slightly higher than the tip, but the shots won't be as good overall.

Be nice if possible. That would help remove a couple timers and a lot of my spaghetti code. Someone want to take a crack at that?

You know what? We are starting to get pretty damn close to being comparable to vpx flippers. Despite my screw up yesterday, I did notice something and made the flick capability easy enough that even I could do it. How it affects the rest of the code remains to be seen, but nice to know my theory was correct at least, though my execution really sucks.
 

shiva

Administrator
Staff member
Site Supporters
Be a while. I actually found a small problem due to in the script, the left flippers go upward as a positive number that decreases, and the right flippers go upward as a negative number that increases, and I didn't quite get the (overly complicated script) variables to reconize the negative numbers properly.
I decided to simplify the code as well if we want to be able to use my DynamicFlipper code for other tables and have others understand it enough to be able to use it, so starting a rewrite and have to check that and make sure things like my EOS are also working. Think I am getting there, but a slow slog as I have to check the debug text every time to make sure the numbers are correct for the flippers and then "think backwards" when I am doing the right flipper code, which apparently I have a hard time doing. (Where's Gimli when you need him...) :)

I can now actually do a several quick flicks from flipper to flipper now with my new code so far, but... I'm still trying to defeat the speed of the flipper causing it to slow down, so it looks like the flipper is dragging when a ball is on it. To do a simple flick, it needs to be at a Omega of 6-7, and that really drags the flipper for the first steps.

Maybe this is a question for Rav, if there is a way possible that might prevent that, the flipper speed being tied into the Omega value. I suspect not, this was something done for the 60's EM boys at the time, the flippers were far weaker back then and it was a realistic behavior, but I guess Black forgot about tables with stronger coils. On a modern Solid State table like mine, looks a bit goofy and just out and out annoys me every time I see it.

If I can ever figure that out, then the next generation of shivaFlippers should be able to do some pretty amazing things and be on par with vpx in nearly all things.
 

shiva

Administrator
Staff member
Site Supporters
I know some people want to play the new version and may be getting fed up waiting. :)

Simply put, haven't really felt into scripting, just couldn't be bothered until now, but I also decided to make some big changes as the script is very complicated and requires a lot of objects. So here's where I am at so far:

- The wall method will only work with my dynamic flipper code, it will not be active with stock BAM dynamic flippers, I think I will need help to get it to work properly with that, and I would rather spend the next amount of time debugging and making sure this works perfectly anyway.
- The code has been entirely rewritten to be a bit more fool proof. It's far simpler to understand (which would help if others want to use it) and I have stripped the code down as much as possible and rearranged it so people have as few steps as possible if they wish to add the shivaDynamicFlippers to their table.
- added a lot of adjustable settings people can change in the code to really customize their flipper behavior. The variable coil and "flick" feature can be user adjustable for flipper angle, ball speed etc, as well as easier code for flipper setup (Start angle,swing) A new code includes the ability to define how many degrees of swing you want for the "flipper Flick" feature to be active and how powerful the omega is for that.
- With my new changes and at certain settings, I have found I am actually able to "flick" the ball from one flipper to another quite easier now and the flipper drag is less noticeable as well now.
- removed my timer helper for the time being to add a delay between a key press and when the solenoid fires. I decided I like living on the edge and since I am actually being successful in being able to flick the ball despite age and my keyboard with this new code (depending on the settings), it may no longer be necessary to have this feature.
- replacing the timers with a single opto trigger for each flipper, and using the triggers to control the walls instead.
- There's now just the one wall per flipper, and so far is only controlled in the opto trigger hit section. You can adjust the curve of the wall at the tip of each flipper to make the ball shoot higher or lower if you like just hitting the slingshots with a press of the flipper button.
- added a lot more instructions to the code for other people so it's easier to follow the script.
- The prehit has 4 separate conditions, one each for a flick, the variable coil, the EOS and a full power swing. The code for that is a lot smaller and may actually work properly.
- EOS is not working at the moment, I disabled it so I can test the other 3 features, but hope to start work on that shortly. My intention was to have the ability to flick over the ball when the flipper is fully up among other things, but I may just leave that and other ideas for a future generation of shivaDynamicflippers instead.

I just have one flipper with the new code working (the tough one, the right flipper) and am doing my tests right now to see how it plays. If no problems, then I will look at the EOS settings and get the other flippers working with this new code.

I found Ravs code for all of this, I found it a bit tough to understand and use, and even then, just didn't seem to play right at all, especially for the type of game I do, but I will revisit it shortly as I noticed the ball mass code and thought with modifications I could get the ball to behave better and maybe, if I am capable of scripting it, experiment a bit with a variable ball mass based on the speed of the ball in conjunction with my dynamicflipper system. I think there could be some interesting things happen with gameplay from this, especially with the flippers, but I can see some other possibilities interacting with other objects as well. Again, I might leave this for a future update as it could take up weeks of my time fiddling with math.
 
Last edited:

wild

No Bam no Play
Chat Moderator
@shiva
So,..I think to understand that your name is like mine,"Paul". right or no? I would also be interested in your new DF system ..... and see what it is....but I have a "very small" problem, I can't do the translation every time,and I don't do all the translation now, because I would not understand anything,the same....for try to figure out what you did, I need to see what you did. ..... so I need a demo, so I can see the code and study it, then if I need some explanation or un help,for to understand better I will tell you, obviously always if you are willing to do it ....so I can put it in my new tables.....what do you answer me?

Meanwhile, thank you very much for having undertaken this journey to improve FPđź‘Ť
 

shiva

Administrator
Staff member
Site Supporters
This is a part time thing for me nowdays, especially with the demands on my time from GF and kid and parents and...
One of the things I am doing right now is rewriting the code, removing a lot of objects and making the entire shivaFlippers far simpler to use for other tables. I know a couple people couldn't understand the previous version enough to be able to use it. I'm going to start working on the EOS code, and maybe make it a bit more sophisticated and give people the ability to flick the ball over when the flipper is fully up shortly. At the moment, the new code seems to be working fine after a couple days of testing. Maybe I should just detail what I have done
- Wall system redone. No more timers, just 2 triggers now plus 2 walls total. The wall has been shorten to just cover the flipper tip area. The walls greatly improve the side shots, and are far more realistic
- All the code is now found in the prehit section of the script. The only additional code outside of the prehit is for the triggers to handle the wall, and BAM coding for NewtonPhysicsTick. There's no more code needed in the KeyPress, and everything has been folded into the prehit.
The walls are easy to remove, delete the walls and triggers, delete the hit events in the script, and find and comment out one line in the prehit code for each flipper.
The BAM code is for that slight drop of the flipper Rav did, but mine is more discrete and is only active at a very high speed ball
- I've added a lot of variables for testing. This will help me fine tune the settings during the private test phase, especially for cabinet use. You can adjust pretty much everything, but there's really only 2-3 numbers that the vast majority will want to change. I may keep this in for the release as well as the debug code, haven't decided yet but I have already written explanations of each setting.
- The code is a bit less this new version. At the moment, just 2 smallish sections, with one being debug code. There is a subroutine that you can set a flag for in a variable just for the main debug code

You can set or change the following things.

- You can set the amount of flipper angles you wish for the Variable coil effect. The script will take that number and use it to calculate the proper omega for each angle swing of the flipper, till it reaches the max omega
- The variable coil works with a flipper flick as well, but as you can see from vpx, most people are not fast enough to do it. I've added the ability to set a limit on the ball speed for the flipper flick to take effect, a minimum omega value if you are doing a flick, where the starting control point is on the flipper for when the effect will take place and the amount of flipper angles to "force" the flipper tip to stay at the absolute min omega. (Once it goes over that, the variable coil will take over)

And that's really it. Managed to par it down quite a bit, though there are very slight ball movement and flipper changed behaviors compared to the previous versions of shivaFlippers. Other devs will proberly find improvements over time.

At the moment, just doing the one flipper and getting it all working. Once EOS is done, and tested by me, I'm going to ask a couple people with cabinets to test it out, play with the numbers and see what the settings should be for cabinet use. (Cabinets are a lot easier and far quicker to press and release the button than on a keyboard)

Yeah, I'm slow and some days my health gets in the way as well, but I will get it done.
 

TerryRed

Pinball Master
It's ready when it's ready. This is a big deal for FP... so any improvements are worth waiting for.

Thanks for trying to tackle probably the most important change to FP that most of us don't fully understand yet.
 

shiva

Administrator
Staff member
Site Supporters
Thanks Terry,I will get there. Weekends are GF days for me, but working on simple eos code now. Very basic code, had a great idea but think I will leave it for some other time. Now it is test test test and test
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • @ 20degree:
    *** *** **** **** ********* *** *** * ****** *** *** ************ ** *** ***** *** **** ** ******* ** *** ***** ****** ******** **** **** ************ **** **** ******
    Quote
  • @ xenonph:
    * * ****** *** ***** **** * *** *** **** **** ******* *** *** *** *** **** ** *****
    Quote
    @ xenonph: * * ****** *** ***** **** * *** *** **** **** ******* *** *** *** *** **** ** *****
    Top