WIP Support File Tutorial BAM FP fpxEngine

Future Pinball
version 1.4.2 is starting. I managed to get a bit done, but had to take some personal time off, but here's a list of things done and planned...

- shivaFlippers 3.2: I'm running experiments using the rotational chart method. So, at the moment, there are no walls or triggers, but the internal code is a lot simpler. The variable coil is a lot more noticeable, so new settings are being worked on. Down the road, you may see variable flipper mass added, but I feel it's more important to get other things done first.
- More manual rewriting to reflect new changes. The beginners Tutorial especially needs to be reworked a bit, as the vast majority of people will just use the vault items to build their table.
- Music system is being redone with new sound files and a master filename system. This is for me, but multiple music sets will be back as well down the road, and if I have that time, complete with voices (be the Solid State stern set though, it takes a long time to do these music files)
- Single xml used due to fp needing to be restarted if script fp changed. Speed boosted in some areas. Now a bit more bouncy than before.
- Adjusted shivaflippers to be less "sloppy". This is due to the nature of FP/BAM not updating the flipper swing after a button press. I have thought up a solution, but won't be worked on till other things are done first
- fixed a lighting issue with Plastic v_fpxHeadConnect1
- started conversion of header and bottom flipper area to Vault items with BAM lighting. This will allow down the road completely new setups for your flippers, like the Centaur setup, or as a example, the williams Black Knight setup, complete with Magnasave. This will be done like any other vault item, select the vault item you want, and copy and paste the objects and script into the engine template. I will be doing the lens lights as a vault item in a future version. Again for the same reason, this allows you to change the bonus system to a different end of ball system (as a example: the KISS bonus or Big Game card system. This will also allow for things like a mini-bonus system to be added as well)
- New Vault items are being added. A simple 3 bumper setup, ABC lanes with lane change (set to bonus Multiplier), a "center piece" setup and maybe multiball. You may also see a couple very simple vault items like spinners.

I hope with 1.4.2 that with all the vault items, a full table design can be completed with a good selection of design and table elements. I will include a sample table (based on what my videos have already shown) with the vaults included, so people have something to play. With the next series of vaults afterwards, (starting with 1.4.3) they will get slightly more complex (and "newer" with each release), and be based on existing arcade tables. (such as the twin kickers from Lost World, or the 5 letter system used in Evil and Star Trek) The intention is to do a small series of vaults each time, and use them to form more sample tables. This allows me to make the vault items "fit better" with each other (which makes things even simpler to use for you) and also it's easier for playability testing as well.
 
Regarding shivaflippers I want to say that I anxiously waiting.

You mention down the road changing the mass. When you get there, make sure you really test that.

I done that with spinners on Bally Spectrum and then hit a problem on a table with just one spinner when using multiball. So I requested help and basically:

It is not safe to change mass when it gets hit [the spinner].
You more less do something like this:
Spinner get hit, it get portion of energy and right after that you change spinner mass 15x times.
Physics engine is about transfer of energy and conservation of momentum. Momentum is velocity * mass. You change mass ... and create mess.
So, the spinner is a special object as it gets "hit" multiple times with just one ball hit (and fp not being all that stable ended up in yet another issue).
I want to tell you abou that just in case you find weird behaviour nonetheless. It might prevent you losing time on something not worth it.
 
Thanks. That would be down the road anyway, and I have wasted enough time on various things as it is. At the moment, hurt my leg so can't do anything much anyway, but keep that in mind when ever I can get out of bed. :(
 
Health first shiva. Take your time.
 
Well, goods news and bad news kind of thing.
The Bad: My leg turned out to be a sprain of the thigh muscle, so literally was in bed for 2 weeks, and then propped up on a cushion for even longer. Couldn't do any work at all, but now at least I can sit at my computer desk.

Today is my Birthday (good), I hit 60 (bad) so I bought myself a present, a steelseries apex pro TKK keyboard. I was whining about my keyboard before, as it was very hard to test the newest variable coil feature due to the old keyboard being very mushy and the travel was too much, so I ended up pressing the key too long even with a tap.

Not any more. This keyboard allows you to adjust the exact distance for when a keyboard registers a hit, so I finally may be able to get accurate results now.

So, getting some new stuff going. Because it takes so long to write up each vault in the manual as well as make all the changes for this next version, I decided the best is to make up a sample table made out of the existing vault items, and have a link to my dropbox to tide you over and you can at least see the new things in there. I'm personally not in love with the flipper rotational chart thing, but it does work though the shots are a bit off from what I like, but maybe people will play the sample table when done and tell me if they prefer it to the walls/triggers method.
 
Welcome back! Glad you are getting better. I have a gaming keyboard by Monoprice. I will never go back to a wireless keyboard or one that is not backlit. I like the Cherry MX Red switches though I think yours has adjustable switches?
 
Last edited:
they are adjustable by key as well. I always hit the caps lock key, so it's nice I can set it to be not as sensitive now. I mean, who uses the caps lock key now days anyway?
 
they are adjustable by key as well. I always hit the caps lock key, so it's nice I can set it to be not as sensitive now. I mean, who uses the caps lock key now days anyway?
Nice...

Personally what I do to my keyboards is to pry off the shift-lock, windows, end, and scroll lock keys, then attach low-width, low-height pegs over the sensor in the middle of each key plot. That way it's almost impossible to accidentally hit those keys, but I can still do it deliberately.

I also hacked off the front of my wired Dell keyboard (attach), including the protruding five keys, so that the front is now perfectly flat and fits nicely in my jury-rigged computer desk. All in line with one of my favorite mottos-- if it looks stoopid but works, then it ain't stoopid.

Btw, yesterday I added a mention and link to fpxEngine in FP's wiki page. Hopefully a few more people will see it now.

Also, happy cake day, welcome back, and I'll catch you later on FB. :-)
 

Attachments

  • dell kbd.jpg
    dell kbd.jpg
    91 KB · Views: 42
Good solution. I brush those keys when I type, but now I can set the travel on each key so I have to force it down for it to make contact. Isn't technology wonderful?
Thanks for the mention. Means I have to get off my ass and get to work though. :(
 
Today is my Birthday (good), I hit 60 (bad)
Congratulations, Blue, I thought you were younger than your age, for heaven's sake, I'm not saying you're old attention, but 60's not old at all.....I assume you will spoil your grandchildren:lol:
 
I do look younger than my age. Very little grey in the hair, etc. on a good day look more like my late 40's. My friends who are younger really hate me because I actually look younger than them. Still, a certain number has been reached, so a little depressed about it. I will get over it.
 
Back at it, while I have the time, and actually feeling like writing code.... this is in progress so maybe a bit more will be added.

Build 1.42
- Single xml used due to fp needing to be restarted if script fp changed. Speed boosted in some areas
- Only Bam version 341 and greater can be used.
- Completed light lens Brightness/GlowRadius/LensGlowBrightness code, all Vault items and core script
- shivaflippers now has full variable coil effect no matter what flipper degree arc. All remaining walls and triggers removed (for the time being) Modified the settings and removed the sloppy effect with the slow down on weaker ball speed shots. Code greatly simplified, and easier to now change.
- Bounce effect for flippers now improved. Any previous issues reported now corrected
- fixed a lighting issue with Plastic v_fpxHeadConnect1
- a 4th setting has been added for pf lighting (fpxBAMpfLighting=4)
- Added delay timer for flippers to make flicking a ball easier.
- started conversion of header and bottom flipper area to Vault items with BAM lighting. This allows a choice from multiple setups in the future with new and different flipper designs (i.e. Centaur/Williams stock with kickback, reverse curved in/out lanes like skateball etc)
- Initial multiball code in place for next release (Build 143)
- New sound and lighting routines. Sound files renamed to set standard file names, to allow for selection from multiple sound set packs. Radar added to lightseg routines.
* Added support
- Ball Lighting
- BallShadows
- Ball Raytracing
- CreateCustomBall
- NewtonTick
* New Vault Items
- ABC Lanes (set to bonus Multiplier) This includes Lane Change (switchable)
- Bumpers (Standard triangle)
* New AddScoringEvents
- Inlane,outlane, and alternating lanes moved to AddScoringEvent to prepare for eventual upcoming Vaults
- Bumpers from existing new vault item. This allows multiple Vaults to be "tied" together in as painless matter as possible (for me at least)
As to the flippers, I just kept it as simple as possible for the sake of any beginners. shivaFlippers and the new df2 is just to complicated for the vast majority of people (in other words, people who are not at a advanced level for coding) who would use this to modify, so the simple solution was to remove as much of the objects and excess code as possible. Instead, I just kept the adjustments when I simplified the main code, and the range of those adjustments seem to be far greater, so these are "good enough until someone else plays with the numbers so I can then steal them if they are better". All the walls and triggers etc are removed, just the flipper rotation chart has been added. I'm not enamored with it but it's good enough for most people, especially beginners. The new variable effect now on any flipper angle really makes a difference, though it takes a while to get use to.

With this next release, I left the objects in for the multiball for people to play with if they want, and see if there are any bugs. A proper Vault item will be created in the version after this one, and more multiball vault items will be added from time to time. fpxEngine will have support for at least 9 balls in play at once, and (if I did this correctly) will be able to trigger separate multiple multiball routines even if a multiball vault routine is running.

My time is very limited at the moment, but I have one more vault routine to do, and a lot of writing in the manual (which always takes far longer to do than writing the code) for this version. So ETA is a bit unknown, though once I get it done with what I have, I will release 142 and not make people wait for those who are interested.
 
Last edited:
Thanks for the update work.

As I mentioned at some point, when I get back to table work I'd like to try this system out for a unique project, and see how far I can go as an FP noobie.

I also notice over 200 users have downloaded this package, and am curious how things have gone for them. I guess maybe I could ask over on /r/virtualpinball, since there's been a lack of feedback, here. Ho hum.
 
I am beginning to agree with you on DF2. Are you finished with the changes you were planning on the flippers? I am really interested in trying them.
 
I can comment on shivaflippers as I've implemented them and the short version is: too much work. But the worse part was aligning the objects needed to use it with the flippers. Not practical at all.

I did try rotationcharts and shivaflippers combined. any 15m of effort tingle the insanity sensor.

Rotationcharts do all the work by themselves without tricks. Everything falloff the physics naturally.

Regarding "object oriented table creation" :) which is what fpx is for me, I believe I said that even like that I will not try doing a table myslef so, I cannot say.

But it was (is) a matter of c&p really. Extending beyond default vaults is still a c&p with some renaming. There is a lot of potential here that I hope get's more people into table creation from scratch.
 
Every time there is a new BAM feature I like or I learn old tricks from original table authors
I try and implement them if needed. But updating 300 tables over and over again is big commitment of time.
So they all basically get the same updates. Some tables get more attention than other based on how much I actually play them.
I have modded and posted many tables here I possibly will never play again?
But still I want them to be playable because it could be someone else's favorite table.
There are only two table MOD's I have done that are on my go to tables list. Pink Floyd and The Good Bad and Ugly.
The tables I usually play have been modded by much more talented people than me.

If you can offer a copy paste simple solution for DF2 for us beginners without needing a math degree, that would be awesome!
But also having the ability to invest time and learning in tweaking parameters in the tables we personally love, that would be epic!
cheers!
 
First off there is nothing wrong with either system. Both are huge improvements on what we had before, and it should be looked at as that.

It's simple really, most people just don't want to spend a huge amount of time with coding, and most in fact have no clue about how to code, or where to start. The vast majority of the people that would use this new setup of mine won't change a thing, this is sort of a product aimed as a consumer product and not a "pro" product. There is only a handful of people that are using either system because they have that level of understanding for the code, this is a stripped down simplified system that is very generic, and has it's limitations, but (once I actually do a manual page for) just about anyone can use. Anyone that plays around with this new setup can always just send me the numbers, and I can do them up as presets, make it even easier.

As it is so simplified, you will be happy to know there are no walls triggers and coding for that anymore. Just shorten code and the rotation chart, so this is as "basic" as possible. The changeable settings you can just ignore if you want, works fine as is. Just variables to increase strength globally, and also to adjust the amount of steps of the variable coil effect. A lot better than having to go over code and work out in the BAM menu if you want to make changes, though you can do that I guess.
I know some people are waiting, it's been a pig getting that code right for several things (bit rusty) so here you all go, a test version attached to this post. Hope it works. It's very messy though.
 

Attachments

  • fpxengine_b142TEST3.zip
    15.1 MB · Views: 34
Last edited:
Quick instructions, all at the top of the script..

Code:
shivaBaseOmega=12                                                                                ' Min Omega used by shivaflippers. separate from base dynamicflippers Omega code and is scriptable. Same as "MinOmega" just there to keep old df values in place. This is a base number that is added to by the script. If you want stronger flippers, make value higher. You just need to change this number once, and not anywhere in the script


Code:
LeftFlipperSwingAngleEnd= 22
            RightFlipperSwingAngleEnd= 22
' You can set the amount of angles the variable coil will need to swing before it hits it's maximum strength (or Omega). A very low value will speed up the shots very quickly, while a higher value slows the
' speed of the shots because there are more angles needed before max strength. This gives you the capability to "loft" shots, as the strength of the shots is dependant on where the angle of the flipper is.
' In prehit, we use a base omega generated by the contact point on the flipper, divide them by this number to get a base value, and then multiple them by the angle of the flipper swing.
' you can play with this number, the variable coil can do flipper flicks, but it requires perfect timing.
' NOTE It is pretty tough to do a flipper flick sometimes, so after this code are helper code to make flicks and eos a bit easier for people.
'    0 - OFF, this turns off the dynamic system, so normal FP flippers that have the same Omega no matter where the flipper angle is, and no flick capability
'     10+ - Fast coil flippers, like lightning flippers or Stern.
'     15+ - roughly wpc era flippers.
'     20+ - Medium. good SS/sys9/sys11 area Flippers
'      30+ - Flippers get slower and slower. be careful you do not go over total swing angle! Flippers shoots weaker as number goes higher

I have this set to 22, but a higher number the variable coil becomes more pronounced, and slower, while a lower number the effect becomes less noticeable, and the flippers are faster. These are just steps, the script will start at a low omega and gradually increase the amount of omega for each new flipper angle till it reaches the number here, which would be normal max. omega

You do not need to change any of the other settings, but you can if you want. Instead of hard coding numbers in my script, I just assign a variable to them, so you only need to change the variable value on one line. The only other variable you may want to change is

Code:
SetFlickMaxBallSpeed=  100                                                                        ' sets max ball speed for a forced flick. variable coil routine takes over if above.

This is used for slow balls so you can tap the ball over, or for set shots. So any balls at a speed below this value will be affected. This is a sort of hard coded omega value for flipper flicking to restrain the speed, and may actually no longer be needed anymore.

The script has the descriptions in it as well for the numbers
 
Last edited:
First impression!
Too be honest found the ball a little floaty, flippers look a little slow.
I like a fast table so this is more of a person preference, changed the ball mass to 100 added some slope.
Not certain how you managed leftYoff="1800" without the ball not sinking into the flippers.
It is just past 4am here and I am not exactly sober enough to take it all in.
I am going to apply this to a couple of different tables and see how it performs, but have to say it is looking good so far.
Nice even ball release off the flippers, not bat shit crazy at the flipper tip and then nothing inbetween.
Well done, Cheers!
 
Thanx.

No restraining wall overlayed over the table, so floaty ball. If you find a better mass let me know then. I noticed the ball mass suddenly got heavy on seawitch in some places, but I assumed it's the code not the xml.

Change leftYoff and rightYoff to 0. That was from Jungle Girl to shoot a bit more to the center, should no longer be needed, unless the ball from the tip keeps hitting the slingshots like normal fp flippers. 1800 seemed to always work for some reason.

You did hit the key thing here. The Bat shit crazy part, it was something that was always "missing" from fp physics (and vpx as well for the most part). The lack of control with a flipper press to "loft" a ball, the inability to fine tune your shot speed depending on when you release the flipper button.

I will try these new values. Thanks again.

For speed change shivaBaseOmega to a higher value, like 16 or something. It's the base amount so the script will automatically scale the different strengths in the math. Also LeftFlipperSwingAngleEnd can be set to a lower value as well, try 18 for a more modern wpc table, or say 15 for sterns. Either or both setting changes will make the speed faster. This example is set to more like 79-82 type tables, slower flipper strength, slower flipper speed.. A weaker coil like later EM or Williams small coil flippers from earlier would be closer to 25 to 30 for a value for LeftFlipperSwingAngleEnd. You can actually get this to play like the 40's flippers! People have different tastes, so pretty easy to change the behavior, just change 2 numbers.
 
First impression!
Too be honest found the ball a little floaty, flippers look a little slow.
I like a fast table so this is more of a person preference, changed the ball mass to 100 added some slope.
Not certain how you managed leftYoff="1800" without the ball not sinking into the flippers.
It is just past 4am here and I am not exactly sober enough to take it all in.
I am going to apply this to a couple of different tables and see how it performs, but have to say it is looking good so far.
Nice even ball release off the flippers, not bat shit crazy at the flipper tip and then nothing inbetween.
Well done, Cheers!
I tried your suggestions, they do work better so I will use them. :)
Also change the flipper angles to 117/-117. The ball from the tip is far less likely to hit the slings, which has always just annoyed the crap out of me.
The other thing is the rotation speed chart. Honestly, I'm fine with them, but, especially compared to the way the flippers and their shot lines were in JG just not quite as good. They were close, but so use to my setup and the shots were pretty much spot on. I know everyone else wants this fancy complex code in their tables, but it occured to me that they would never use fpxEngine anyway, and any flipper setup I would massage so the shots from the flippers would line up with the main table shot lines anyway, and no one would want to change them.
Decisions, decisions. I'm trying out George's rotational chart shortly, see if it's close enough or the shots seem better. In the meanwhile, found a nasty little bug, so will be pulling out my hair for the next few days fixing that. In retrospect, I should have just used the JG script to rebuild fpxEngine, far easier. sigh...
 
I think the floaty ball is caused by having 3 subs for the bounce code run every time the ball hits the flipper . It is not too hard to consolidate the following 2 subs into OnPreHitFlipperSettings(FlipperExt)

OnPreHitFlipperSettings_nobounceControl(FlipperExt)
OnPreHitFlipperSettings_bounceControl(FlipperExt)

I discovered when I was working with Paolo's flipper bounce sound that running too many subroutines will slow the ball down for the whole game.

I have added the shiva flipper code to a standard FP template because I can't add the fpxengine code to a normal table. I posted my working copy where I consolidate to code into one. All of the exact same code runs the way you wrote it. It just has 2 less subs. @NitroNimbus you might want to try to see if it is less floaty.

=======================

I noticed that it looks like you missed adding a piece of code to the right flipper in the sun AddKeyEvent(KeyEventVariable)

The code "RFStart=0" appears to be missing. At least you added "LFStart=0" to the left flipper so it seems like the right flipper should match.

=======================

You said the change "leftYoff" in the XML to 0. I have found that changing these values can affect the amount of bounce. I ended up changing all the preset values I created once to use the left?off valuyes set to 0 when they used to be 1500.
 

Attachments

  • ```Shiva Flippers.fpt
    237 KB · Views: 23
So now I get it... WTF?
 
So now I get it... WTF?
The flipper code needs to run very quickly just before the ball hits the flipper. When there are too many subroutines in the code that have too run, there is too much time required to search for subroutines in the entire script. It is best to have as few subroutines as possible. I have found the code can be pretty long and still be OK but searching for subroutines takes longer than running the code. So having fewer subroutines makes the code run much faster and it prevents slowing the game down.

Just try the attached demo table on the previous message and see if it works for you.
 
I found today that the Sub Initialize() can be incorporated into the Sub NewtonPhysicsTick. I don't see any others.
 
Forum activity
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.
      Mibs Mibs: JonPurpleHaze has posted a new reply in the thread "What music are you listening to?".
      Back
      Top