Code/Example BAM New Feature ShadowColor fins (flippers)

Coding and examples for future Pinball and BAM
Cool! I guess I missed it somehow.
 
Oh... I know the Tron game mode on RetroFlair 2 would VERY much benefit from that feature.... and I'm getting much closer to finishing Tron mode. I would love to add this before showing it off to the general public.

@wild @ravarcade

Is this on an unreleased beta? Is there a link to how to use this feature and where to get the beta / update?
 
Last edited:
Maybe you are right and I didn't actually miss it because it is not even released yet.
 
Yes..guys..here the beta and demo....adapted by me
for those who do not know .....I recommend (also Rav...recommend you) to copy the old dll, from before, if you have problems .. remember that it is a beta .... it is not a release, so be careful.
 

Attachments

  • BAM-flipper-shadows.zip
    1.9 MB · Views: 84
Working nice so far for coloured flipper shadows in Tron mode.

I had it working with a nice "pulsing" effect for a glowing light effect under the flippers (timer changes the radius of shadows)... but I found that this caused stutters. Looked cool though.
 
but I found that this caused stutters. Looked cool though.
probably this new feature could be improved, if you... have made more use than I have been able to do for now and up to now .... you could tell Rav ..... yourself

@Gimli
@GeorgeH
@TerryRed
@NitroNimbus
@popotte
@ravarcade

I wanted to share with you a fact that happened to me ... it will be very short ... I hope you can understand ... the other night trying a table that is under construction with another of my compatriots ... I have noticed that if you open a whichever table it is or by anyone sent, this overwrites your "cfg" file ..... so if a function that is optional (first) is on the menu, (and then) and in the script, it automatically writes it to the bam menu ... via file "cfg" I think you know this .... right? .... the problem is .... that if you go to delete that particular "xbam" code in the script that has been overwritten even in the menu .... even if you delete it from the scrip it remains inserted in the menu ..... this could be a problem, I referred it to Rav .... a few minutes ago

I think it's a priority problem .... sometimes the script has no priority ... such as the "table slope",Here which George and I have discussed .... I hope Rav .... can understand how I explained it
 
unfortunately I am also a human being, who can make mistakes .... so I beg your pardon .... also rav ... because I did not know that this code affected the fins

xBAM.SetBallShadows 1.0 , 1.2 , 0.4 , 1 to xBAM.SetBallShadows 0.0 , 1.2 , 0.4 , 1

my compatriot removed the shadows from here, and I didn't know it ... so as to induce me to make an error of assessment .....and i thought i had eliminated it elsewhere, gimli knows this from scale = 0 in MiniPlayField


on the other hand, however, the fact that I discussed with George ....(table slope) it seems true .... but now I also have a doubt ... that maybe i and George were wrong?
 
Last edited:
@TerryRed
I saw it on a video of yours, I don't remember what it was, you could share here,because I haven't seen a suitable thread for this new feature that all you have created thanks to rav ... of course

if is possible for you...a demo,whit the light of the flashes that turns ... I would like to use it for my table .... but if possible, a simple code to understand
 
@TerryRed
I saw it on a video of yours, I don't remember what it was, you could share here,because I haven't seen a suitable thread for this new feature that all you have created thanks to rav ... of course

if is possible for you...a demo,whit the light of the flashes that turns ... I would like to use it for my table .... but if possible, a simple code to understand


Here's a good test table.

A flasher spotlight is static.

when used with newton tick sub, the values for the spotlight can be changed in real-time to change the spotlight into a beacon.

...an explanation for spotlight flashers...

Code:
'From rav about how to use spotlight

'Flasher1Ext.SpotLight(coneAngle, rotationAngle, verticalAngle, falloffAngle)

'coneAngle - angle where light works like normal point light
'rotationAngle - clockwise rotation angle. Zero is table-up
'verticalAngle - vertical angle. Zero is down straight into playfield, 90 deg is horizontal.
'falloffAngle allows to make edges of spot light blured.

Sub NewtonPhysicsTick()
Dim i
i = (xBAM.NewtonCounter Mod 256) / 256
Dim j
j = ((xBAM.NewtonCounter + 128) Mod 256) / 256

Call Flasher1Ext.SpotLight(1, i * 360, 70, 75)
Call Flasher2Ext.SpotLight(1, j * 360, 70, 75)

End Sub
 

Attachments

  • spotlight-custommodel-test-2.zip
    2.6 MB · Views: 99
Last edited:
thanks...terry....now i try to use it
 
I felt a bit intimidated myself with the spotlight code but I may try it now. I am not interested in the revolving beacon but just want to spotlight objects. An example would be the model of the shuttle on Space Shuttle. I assume the light will be static if you don't use the Sub NewtonPhysicsTick().
 
@TerryRed
but how many resources does this function take from the pc? or rather how many do he need? I have almost the total block of the pc all in slowed down

@GeorgeH
but just want to spotlight objects.
which means to put spotlight objects?or maybe do you want to turn the model into light or bulb?
 
@GeorgeH

This is the only command you need. It changes a flasher from a point light to a projected spot light with whatever settings you give.

Call Flasher1Ext.SpotLight(coneAngle, rotationAngle, verticalAngle, falloffAngle)

@wild

When I asked ravarcade about these spot lights, he said they should be no different for resources than a normal flasher. It just uses different math... but you must use New Renderer for it to work.
 
Last edited:
When I asked ravarcade about these spot lights, he said they should be no different for resources than a normal flasher. It just uses different math... but you must use New Renderer for it to work.
ok ... but this demo ... it's a bit complicated ... too many objects, one with only a flash, you could make it,please?
I have to understand why I have almost the total slowdown, so I don't think that by activating the NR, for just one flash I have this terrible slowdown ...... never had before
 
ok ... but this demo ... it's a bit complicated ... too many objects, one with only a flash, you could make it,please?
I have to understand why I have almost the total slowdown, so I don't think that by activating the NR, for just one flash I have this terrible slowdown ...... never had before


Call ExampleFlasherExt.SpotLight(20, 42, 80, 2)


Just change ExampleFlasher to the name of the flasher you want for a spotlight. Try it on a new table. these are the paramters.


ExampleFlasherExt.SpotLight(coneAngle, rotationAngle, verticalAngle, falloffAngle)


It's possible your hardware may struggle if its an old computer, as this feature is used only with New Renderer which is more demanding on resources since this is real dynamic lighting.
 
as this feature is used only with New Renderer which is more demanding on resources since this is real dynamic lighting.
i know terry, i use it for my tables, but i have not had these problems with normal lights
 
for those who don't know ... here is the method used by Rav, to create the colors, in practice you have to divide by 255, each RGB of your favorite color.

thumbnail_image.png

this for ball
xBAM.SetShadowColor "", 0.914, 0.69, 0.38


this for 2 fins
xBAM.SetShadowColor LeftFlipper, 125, 125, 125

xBAM.SetShadowColor RightFlipper,125, 125, 125
 
Correct, they are the standard RGB values of 0 to 255.

In the FP editor, you can just click on the colour button when selecting an object to get the values as well.

1612287324631.png
 
Hi @TerryRed ,

Tell me if i'm wrong, but, is it not possible to have more than 7 Flasher "On" at the same time, No? ( Due to number of "Hardware light" in FP option )
 
Hi @TerryRed ,

Tell me if i'm wrong, but, is it not possible to have more than 7 Flasher "On" at the same time, No? ( Due to number of "Hardware light" in FP option )

It depends where you you set "Hardware lights to use." in the options. Seven flashers are the max. Anything higher than 7 flashers converts the flashers to bulbs. FP will switch flashers around so the flasher closest to the ball closest to the ball won't convert to a bulb. Of course, most tables don't light all the flashers at the same time. It is something to consider when building a table.
 
yep.. too bad.. the ldea was to make gi with flasher and a bulb model.
About flasher glow witch is visible through all element... juste make the model whithout the collision shape with fpm editor... you will not have glow through element anymore
 

Attachments

  • 1637169850110.png
    1637169850110.png
    1.1 MB · Views: 38
  • 19491-5287e58cdb530b62c680ed8004c4852e.mp4
    1.5 MB
Yup.... its a FP limitation.

Its why most of us when updating tables for BAM.... tend to use 3 or 4 flashers (with an invisible model or nano model that you can't see) to act as the GI and place them in either the slings or flipper plastics or both.... maybe one in the back area,etc.

That leaves you a few to spare. That's usually "good enough"... and you can combine that with the glow from bulbs to work well enough.
 
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.
      Chat Bot Mibs Chat Bot Mibs: keefus is our newest member. Welcome!
      Back
      Top