shivaFlippers 3.1 tutorial and example

shiva

Administrator
Staff member
Site Supporters
With the debut of the variable coil system with the latest release of Jungle girl fpx, Future Pinball flipper physics took a step forward to respectability. The ability to be able to fine tune the speed of the shots coming from the flippers have made a big change to the playability of FP games. The reviews coming back have been very positive, and I thank those who have commented, but others have said the system is too complicated and not very adjustable.

As well, people who wish to use shivaFlippers have had problems understanding the code because of the complexity and the fact the code was highly modified to fit the parameters within the Jungle Girl fpx game. A couple people have asked me to do a tutorial on getting shivaFlippers to work in their Future Pinball table, so the last little while, I have been working on a example table with just the shivaFlipper code using the Stock FP template (or "new table") template.

This new version is a very highly stripped down version of shivaFlippers, in fact as much unnecessary code (including all the BAM code not needed) has been removed. I also rearranged and rewrote the main code, removed all the custom JG code, and stripped out any unused or unimportant code. This is a (very simplified) "wall" system (for proper aiming of shots) and the main pre-hit code for my dynamic and variable coil system.

With my new computer, with a proper keyboard, I'm finding it very easy to "tap" the flipper now, with no flipper slowdown. Sometimes, the flipper transfers the ball from one flipper tip to another without the flipper even moving (I love this keyboard) but some of you may not have a great keyboard, and may notice the ball on a tip may cause the flipper to "drag". This has been something that has driven me nuts, and I still haven't been able to defeat this problem, so I am asking for others to help come up with a way to defeat this annoying FP problem. If we can beat this, I can work on the next part of the variable coil system which will greatly improve other aspects of the flippers, but I can't do so if the drag on the flippers continue. I really hope people will take some time on this, a lot of players in their comments have said the variable coil system makes a pretty big improvement. I just wish to do better, so all tables will improve, and not just mine.

As to a tutorial, with removing a lot of things and stripping the code to it's basics, it's really not needed, as the script has a built in tutorial with all the remarks I have put in. I have removed all the specialised subroutines, like the pre-sets, and just explained the adjustable variables and walked you through the script. This is pretty close to a cut and paste job, though there is very little BAM code left. Most authors like to do their own code, especially the BAM code, in their own way, so I decided most of you would rather prefer to just add your own code rather than modify mine, which is quite complex.

shivaFlippers uses a custom forced dynamic code for each contact point on the flipper as well as a set of "walls" for the flippers to adjust the aiming of the shots to a far more realistic manner.
The script is very heavily commented to help you walk through the script, as well as explain the main settings. The developer can adjust these settings to his taste or style of pinball game, so here is a brief description of each main setting.

shivaBaseOmega
Very much like the MinOmega used for stockDynamicFlippers. I used a separate variable to prevent any interference with that code. Raise (faster shots) or lower (slower shots) the value

FlipperSwingAngleEnd
The amount of "steps" (or degrees of angles of a flipper swing) you want for the variable coil system to reach before maximum omega. As a example, when you press the flipper button when the flipper is fully down, the flipper will gradually increase the omega till it reaches this defined degree of angle in a flipper swing, and then will be at it's maximum omegas. All additional angles beyond that is at maximum omegas as defined in the pre-hit.

LeftForceFlickForTheseFirstAngles,RightForceFlickForTheseFirstAngles
Though no longer really necessary, these variables and the ones following was left in for the next version of shivaFlippers. This is for a very slow ball rolling down the flipper, when the ball is at the tip, a quick tap of the button will cause the ball to take a very slight jump to the other flipper (called a tap pass). shivaFlippers has special code to help the average player do this by giving them the ability to define how many flipper "steps" (or angles) they want the code to take effect. This code is used to help prevent the flipper omega from falling to low, and helps prevent any flipper "drag"

AbsoluteMinOmega
The lowest omega possible with a "Flipper flick". By default it is set to 3, which is a very weak "flick", though values up to 6 or 7 work fine. If you go lower, the flippers may not even have any force to move the ball, or is to weak to transfer the ball from one flipper tip to another.

SetFlickMaxBallSpeed
The third and final variable for a "flipper Flick". This sets the ball speed for the effect to take place, once it is over the defined value for it's speed, AbsoluteMinOmega, LeftForceFlickForTheseFirstAngles, and RightForceFlickForTheseFirstAngles are deactivated completely and the normal variable coil routine will be used.

For those of you who like to look at numbers, press the F9 key for the debug text. this shows the variable values including the variable coil omega and is generated for every flipper RELEASE.

I should also note that there is a small bit of code in the prehit that "doubles" the AbsoluteMinOmega for when a ball is between the flippers (using a trigger hit) This is there because the flipper tips may be too weak to get the ball out of trouble and prevent a drain, so the player can't "save" the ball. If you put AbsoluteMinOmega too high, (like over a value of 6) you may want to disable this code.
For the left flipper, remove or disable this code in Sub LeftFlipper_prehit()
' * Ball is between the flippers. We need to increase the omega here so player can "save" the ball. IF LastSwitchHit IS TriggerOptoMiddleFlipper AND (xBAM.Ball.Speed <= SetFlickMaxBallSpeed) AND LeftFlipperExt.ContactPoint <= 1.2 THEN LeftFlipperExt.Omega = (StoreLeftOmega*2) ' need to boost the omega here so player can "save" a ball between the flippers Exit Sub ' make sure we exit END IF

And for the right Flipper code in Sub RightFlipper_prehit()
' * Ball is between the flippers. We need to increase the omega here so player can "save" the ball. IF LastSwitchHit IS TriggerOptoMiddleFlipper AND (xBAM.Ball.Speed <= SetFlickMaxBallSpeed) AND RightFlipperExt.ContactPoint <= 1.2 THEN RightFlipperExt.Omega = (StoreRightOmega*2) ' need to boost the omega here so player can "save" a ball between the flippers Exit Sub ' make sure we exit END IF
Those of you who would like to use this code for their own tables or mods can do so. This is meant to be shared by everyone, unless you try to sell it, then I will hurt you.

As mentioned before, this was made as simple as possible. Once someone comes up with a way to override the flipper drag effect, I can then add the next stage to the variable coil, which will include a proper EOS system, and the ability to do some additional flipper tricks. Beyond that, people are also welcome to add other code, like a proper Full BAM setup like shadows/lighting, a better aiming system etc.

I feel this is very important to FP. Future Pinball is getting a lot of notice now, especially with JG getting a lot of youtube views and facebook postings. We need to continue to make FP better, and the entire game is based around those flippers and how they play. We have made great strides in the last couple years, but we still have a ways to go. I am hoping that other members here work on getting the flippers better with me, and then working together on a master script for all the other BAM features down the road. We all love doing this but we can do better if we concentrate on the most important things. Nothing is more important in a pinball game than the flippers, and lets be a little honest here, the flippers still kind of suck.
 

Attachments

  • shivaFlippers.zip
    57.5 KB · Views: 18
Last edited:

wild

No Bam no Play
Chat Moderator
@shiva
in your "shivs flippers"

' <flipper rotationSpeedChart="{0.0,100.0}[0.0,100.0]" newtonDamping="1" releaseOmega="18" mass="20000" omega="33" moeMethod="0"
' leftXoff="0" leftYoff="0" leftZoff="0"
' rightXoff="0" rightYoff="0" rightZoff="0"></flipper>

this parameter in xml, how you configure it? in black
 

shiva

Administrator
Staff member
Site Supporters
This was really just stuff I found over the years, and then just blindly played with the numbers till I got it to work right. I made the mass super strong to try and prevent the ball dragging on the flippers at very slow speed. The flipper rotationSpeedChart I don't think anyone knows how to work properly, but 100 seems to be the best generic value. You can do 50 as the numbers as well, for faster swings, but for the most part, these are just generic settings I have had for years. I found the xml isn't really affecting the flippers all that much, and I get far better results in the script code with shivaFlippers.
 

wild

No Bam no Play
Chat Moderator
Ok,thanks.....so ,I put this way,so according to your explanation it should be better...?

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

releaseOmega="36" and omega="36".....are the values that I have set on my "dynamic flipper" .... I noticed an improvement
 

shiva

Administrator
Staff member
Site Supporters
Guess so. There is no generic all in one solution, just what ever works best per table. Since i use shivaflippers, the omega code in the xml is really not needed, and I found with playing with numbers that it really didn't change much. remember though I don't use stock dynamic flippers, I use my own custom setup as I found it just plays a lot better, or at least more to my taste.
 

Ike Savage

Froggy like robot
Staff member
Site Supporters
Well dang, I'd love to see what @NitroNimbus and @GeorgeH can do with this in particular, since they're such old hands at remaking / improving tables.

Also, speaking as a general FP-dumbass: Yo Paul, how would this code-set interact with an XML doc set of FP physics... assuming that makes sense?
 

GeorgeH

Flippered Out
Staff member
Site Supporters
Well dang, I'd love to see what @NitroNimbus and @GeorgeH can do with this in particular, since they're such old hands at remaking / improving tables.

Also, speaking as a general FP-dumbass: Yo Paul, how would this code-set interact with an XML doc set of FP physics... assuming that makes sense?
I never really figured this code out. I am not sure how much or if any of it works with dynamic flippers.
 

wild

No Bam no Play
Chat Moderator
honestly mass = "99999", copied it from smoke, release Omega = "xx" and omega = "xx as you set in your standard" dynamic flipper "

I tried it in my "EM", I find it better.....

like........this
<physics slope="5.8" fps="296" threaded="1"></physics>
' <ball newtonDamping="0.002" mass="160" gravity="9810" damping="1.0"></ball>
 

shiva

Administrator
Staff member
Site Supporters
Should work fine Nic. You can adjust anything if it doesn't quite work out.
It should work fine with dynamic flippers, though I actually didn't think the dynamic flippers work well with a few tables, including mine.
I have noticed with this new rewrite the variable coil seems a bit more noticeable, and as I stated before, the better the hardware, the better the effect, the easier it is.
 

Ike Savage

Froggy like robot
Staff member
Site Supporters
I never really figured this code out. I am not sure how much or if any of it works with dynamic flippers.
Should work fine Nic. You can adjust anything if it doesn't quite work out.
It should work fine with dynamic flippers, though I actually didn't think the dynamic flippers work well with a few tables, including mine.
I have noticed with this new rewrite the variable coil seems a bit more noticeable, and as I stated before, the better the hardware, the better the effect, the easier it is.
Say... what if we colluded upon a starter table & guide, perhaps? A demonstration of how to get shivaFlippers 3.1 off the ground for yon average table-maker? Something like that?

Me, I'm pretty good at explaining things. You guys-- FP code wizards & tweakers. Maybe we could put together a simple guide for noobies, say?

Anyway, just a thought, hehe.
 

shiva

Administrator
Staff member
Site Supporters
Everything is in the table example, complete with descriptions, in the table example attached at the first post. Far as I am concerned, I'm done
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    @ xenonph: * * ****** *** ***** **** * *** *** **** **** ******* *** *** *** *** **** ** *****
    Top