Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » BAM corner




Post new topic Reply to topic  [ 2242 posts ]  Go to page Previous  1 ... 195, 196, 197, 198, 199, 200, 201 ... 225  Next
Author Message
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 2:32 pm 
Offline
User avatar

Joined: Sun Sep 13, 2015 1:16 pm
Posts: 535
SLAMT1LT wrote:
TerryRed wrote:

But man this could lead to some really cool effects. Imagine F-14 Tomcat's Beacon using hardware flashers... or Aliens Legacy when the power goes out, you can have moving hardware flashers for an emergency beacon effect...

....or for Jaws you could have all the Flashers appear white for "unlit".... but then have them change to any colour you want for any modes or events such as Shark Cage.

Using movable hardware flashers far away from the visible playfield can make for some neat effects...especially for horror themed games! You could use no model for the flasher...or a nano flasher,etc.

Or maybe use them for Blade Runner when the Police Car flies across the playfield...it top lights would illuminate the PF as it goes.

Maybe you can somehow use many lights with Glow radius (not hardware lights) for the Star Wars DSA Lightsabers... HEY! We can now choose our own coloured Lightsaber with this feature! Screw you Galaxy's Edge! :)



Yes, so many new ideas. I still don't think it's possible to move hardware lights to create the tracking effect you mentioned for Blade Runner. That might be out of BAM's reach.

Future Pinball is still restricted by it's 12 year old engine. Zen Pinball's engine is light years ahead of Future Pinball and I'm very jealous of the effects they can pull off. But their games are boring :lol:

I was about to change the light inserts for Star Trek when I got the mediation error...so I'm already on it.


Rav's demo table shows it can be done (moving the hardware lights / flashers). Also you can use Bam mini playfield to move flashers with another object too....however once you remove the flasher model, you still see the center glow (not the Halo Flare) from the hardware light and that may be too large for something like the Police Lights.

It definitely can be done for a Beacon type of effect to project like in a circular manner...the hard part is making sure you don't see the center glow from the flasher.


Agree FP engine is restricted (but amazingly impressive for it's age)....but with it's BAM hardware per-pixel Lighting....in that respect it's still able to look MUCH better than FX3 in that regard. Zen has great artists though....but your voice over work is MUCH better than theirs! :)

We really need a good example of bump / normal mapping combined with the newer lighting control to show off what can be done. Something like Apollo 13's moon with bumped craters and "sun" lighting could look really nice.


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 2:37 pm 
Online

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2850
Location: Ontario, Canada
Gimli wrote:
Code:
' I modifeid the physics to make the ball appear heavier and slower, like a bowling ball
' but you can easily switch it back to a normal ball...

'=============================== PHYSICS XML ===========================
'<?xml version="1.0" encoding="utf-8"?>
'<document>
'  <!—Custom Physics for Strikes And Spares -->
'  <physics fps="296" threaded="1"></physics>
'  <ball newtonDamping="0" mass="90" gravity="6200" damping="0.65"></ball>
'  <flipper releaseOmega="18" rotationSpeedChart="{0.0,100.0}[0.0,100.0]" newtonDamping="1" mass="20150" omega="43" moeMethod="0"
'           leftXoff="0" leftYoff="1500" leftZoff="0"
'           rightXoff="0" rightYoff="1500" rightZoff="0"></flipper>
'  <bumper impulse="90.0" impulseRandomness="0" vectorRandomness="6"></bumper>
'  <autoplunger mass="20000.0" force="60000.0"></autoplunger>
'  <diverter mass="10000.0" omega="33.0"></diverter>
'  <gate mass="5.0" gravity="2500.0" damping="0.25"></gate>
'  <kicker impulse="1000.0" vukImpulse="1400.0" impulseRandomness="2" vectorRandomness="1"></kicker>
'  <plunger mass="20000.0" force="30000.0"></plunger>
'  <slingshot impulse="645.0" impulseRandomness="15" vectorRandomness="3"></slingshot>
'  <spindisk mass="10000.0" angularDamp="0.33" linearDamp="0.25"></spindisk>
'  <spinner mass="60.0" gravity="100.0" angularDamp="0.25" angularAccel="5.25"
'           spinDampLoose="0.55" spinBackLoose="1.70"
'           spinDampNorm="0.75" spinBackNorm="1.80"
'           spinDampTight="0.95" spinBackTight="1.90"></spinner>
'  <emkicker mass="10000.0" omega="80.0"></emkicker>
'  <varitarget mass="500.0" damping="0.9" tension="3.0" return="15.0"></varitarget>
'  <magnet impulse="10.0" impulseRandomness="2"></magnet>
'  <nudge impulse="240.0" impulseRandomness="25.0" warningLevel="300" leftAngle="60" upAngle="0" rightAngle="320"
'         vectorRandomness="5" visualDistance="3" waitPeriod="300" maxBallVelocity="500.0"></nudge>
'  <defaultMat softnessCoef="0.03" elasticCoef="0.1" staticFriction="0.01" kineticFriction="0.02"></defaultMat>
'  <playfieldMat softnessCoef="0.02" elasticCoef="0.1" staticFriction="0.01" kineticFriction="0.02"></playfieldMat>
'  <metalMat softnessCoef="0.01" elasticCoef="0.15" staticFriction="0.02" kineticFriction="0.02"></metalMat>
'  <woodMat softnessCoef="0.03" elasticCoef="0.15" staticFriction="0.03" kineticFriction="0.02"></woodMat>
'  <plasticMat softnessCoef="0.02" elasticCoef="0.2" staticFriction="0.02" kineticFriction="0.01"></plasticMat>
'  <rubberHardMat softnessCoef="0.08" elasticCoef="0.50" staticFriction="0.04" kineticFriction="0.055"></rubberHardMat>
'  <rubberIntMat softnessCoef="0.1" elasticCoef="0.72" staticFriction="0.05" kineticFriction="0.065"></rubberIntMat>
'  <rubberSoftMat softnessCoef="0.12" elasticCoef="0.83" staticFriction="0.06" kineticFriction="0.075"></rubberSoftMat>
'  <gateMat softnessCoef="0.05" elasticCoef="0.65" staticFriction="0" kineticFriction="0"></gateMat>
'  <kickerMat softnessCoef="0.01" elasticCoef="0.05" staticFriction="0.8" kineticFriction="0.8"></kickerMat>
'  <rampMat softnessCoef="0.01" elasticCoef="0.01" staticFriction="0.01" kineticFriction="0.01"></rampMat>
'  <plungerMat softnessCoef="0.04" elasticCoef="0.55" staticFriction="0.02" kineticFriction="0.02"></plungerMat>
'  <spindiskMat softnessCoef="0.05" elasticCoef="0.5" staticFriction="1.5" kineticFriction="2"></spindiskMat>
'</document>
'=============================== PHYSICS XML ===========================

xBAM.CreateAllExt

' === Ball Rolling FX ===

ExecuteGlobal LoadExternalScript ("ZBRrollingballsoundslib.vbs")

ZRBrampHeight = 40
ZRBtablewide = 516

ZRBsoundballchan = 2
ZRBvolNormLevel = 0.4
'ZRBrollingSound="zfx_ballrollingb2"
'ZRBPitchTunning=-40

ZRBrampSoundballchan = -1  'set to -1 to disable rampsound roll
ZRBrampVolNormLevel = 0.40
'ZRBrampRollingSound="zfx_ballrolramp"
'ZRBrampPitchTunning=40



' === Dynamic Flipper Settings ===

Const BAM_VERSION = 0
AddDebugText BAM_VERSION

Sub BAM_Init()
   If BAM_VERSION < 233 then Exit Sub
   'Set RightFlipperExt      = xBAM.Flipper("RightFlipper")
   'Set LeftFlipperExt       = xBAM.Flipper("LeftFlipper")
   End Sub







If BAM_VERSION => 233 then
'Dim RightFlipperExt,LeftFlipperExt            ' Needed for BAM
Dim omegaCorrectionR
Dim omegaCorrectionL
xBAM.BallSpeedLimit = 3000
End If

Sub OnPreHitFlipperSettings(FlipperExt)
   If BAM_VERSION < 233 then Exit Sub
 OnPreHitFlipperSettings_bounceControl(FlipperExt)
End Sub


If BAM_VERSION => 233 then
   const MaxOmega  = 45  ' Omega at base of flipper.  Must be > MinOmega. Default = 45
   const MinOmega  = 32  ' Omega at tip of flipper. Must be < MaxOmega. Default = 32
End If

Sub RightFlipper_prehit()
   If BAM_VERSION < 233 then Exit Sub
   OnPreHitFlipperSettings(RightFlipperExt)
   omegaCorrectionR = MaxOmega - (RightFlipperExt.ContactPoint * ((MaxOmega - MinOmega)/1.2))
      If RightFlipperExt.ContactPoint < 0.0 then RightFlipperExt.Omega = MaxOmega
      If RightFlipperExt.ContactPoint > 1.2 then RightFlipperExt.Omega = MinOmega
      If (RightFlipperExt.ContactPoint => 0.0) And (RightFlipperExt.ContactPoint =< 1.2) then
         RightFlipperExt.Omega = omegaCorrectionR
      End if
End Sub

Sub LeftFlipper_prehit()
   If BAM_VERSION < 233 then Exit Sub
   OnPreHitFlipperSettings(LeftFlipperExt)
      omegaCorrectionL = MaxOmega - (LeftFlipperExt.ContactPoint * ((MaxOmega - MinOmega)/1.2))
      If LeftFlipperExt.ContactPoint < 0.0 then LeftFlipperExt.Omega = MaxOmega
      If LeftFlipperExt.ContactPoint > 1.2 then LeftFlipperExt.Omega = MinOmega
      If (LeftFlipperExt.ContactPoint => 0.0) And (LeftFlipperExt.ContactPoint =< 1.2) then
         LeftFlipperExt.Omega = omegaCorrectionL
      End if
End Sub


Sub OnPreHitFlipperSettings_bounceControl(FlipperExt)
   If BAM_VERSION < 233 then Exit Sub
   ' Params to tweak
   const base_elasticCoef                        = 0.90 ' very bouncy flipper rubber
   const expected_ball_speed_after_hit           = 350  ' calc elasticCoef to get desired ball speed after ball hit flipper
   const minimum_elasticCoef_to_scale_fast_balls = 0.15 ' we will add this to calculated elastiCoef, so ball after hit will have aditional 5% of speed before hit
   const reduction_for_flipper_in_motion         = 0.17 ' if flipper is not in starting point, reduce elasticCoef by 20%
 
   If FlipperExt.Hit Then
      Dim elasticCoef
      Dim maxElasticCoef
      Dim ballSpeed
      ballSpeed = (FlipperExt.BallVSpeed + xBAM.Ball.Speed) * 0.5 ' averge speed of

      maxElasticCoef = base_elasticCoef
      If FlipperExt.AngleDiff > 1 Then maxElasticCoef = maxElasticCoef - reduction_for_flipper_in_motion

      elasticCoef = base_elasticCoef
      If ballSpeed > 1 Then elasticCoef = expected_ball_speed_after_hit / ballSpeed
      elasticCoef = elasticCoef + minimum_elasticCoef_to_scale_fast_balls

      If elasticCoef > maxElasticCoef Then elasticCoef = maxElasticCoef

      FlipperExt.SetMaterial elasticCoef
   End If
End Sub

' === End of Dynamic Flipper Settings ===


All I did was put createallext at top and inactivate Dim and Set leftflipperext and rightflipperext references...

simple demo table
https://www.dropbox.com/s/8757z6h8r5jlv ... e.fpt?dl=0

press V and B to change flasher colour...
I copied your code from spares and strikes minus the shadow textures...


SLAMT1LT wrote:
Yes, so many new ideas. I still don't think it's possible to move hardware lights to create the tracking effect you mentioned for Blade Runner. That might be out of BAM's reach.


Of course it is Rav's demo shows you can move flashers where ever you want them...


Here's a demo table moving the flasher with "m" on keyboard
"b" and "v" change color
https://www.dropbox.com/s/kazkylp51mixz ... n.fpt?dl=0

the code is easy:
Code:
Flasher1Ext.SetPosition Flasher1.x, Flasher1.y- 10, 14


So in above code we are changing position of "Flasher1"

Flasher1.x, Flasher1.y is the table objects x,y position. the z offset value or elevation of 14,
I stole from Rav's demo table
"Flasher1.y - 10" Move the Flasher1 down the y axis (which is up the table ) by 10 units.

You can enter any location you choose for instance if you move mouse along table editor
and look at the numbers at the bottom you will see x=0, y=0 is top left corner of table
so to move Flasher1 there code is:

Code:
Flasher1Ext.SetPosition 0, 0, 14



BAM already knows the location of all table objects and you can simple code any objects default location as so:
Code:
objectname.x,objectname.y


Last edited by Gimli on Tue Sep 03, 2019 8:43 am, edited 3 times in total.

Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 2:43 pm 
Offline

Joined: Wed Nov 17, 2010 7:41 pm
Posts: 947
Well I'll have to have a look at that. I didn't think it was possible.

Ta-darrrr......Star Trek with colour-changing LEDs.

https://youtu.be/QFOha-4xRnQ


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 2:48 pm 
Online

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2850
Location: Ontario, Canada
SLAMT1LT wrote:
Well I'll have to have a look at that. I didn't think it was possible.

Ta-darrrr......Star Trek with colour-changing LEDs.

https://youtu.be/QFOha-4xRnQ


Amazing !
I like the Vengeance Spring too ! :shock:


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 2:49 pm 
Offline

Joined: Wed Nov 17, 2010 7:41 pm
Posts: 947
Wow.....well that changes everything! Movable hardware lighting....now that is impressive. I did try and capture a nano flasher for my Blade Runner Police Spinner demo but it wouldn't work. I need to revisit this.


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 2:55 pm 
Offline
User avatar

Joined: Sun Sep 13, 2015 1:16 pm
Posts: 535
SLAMT1LT wrote:
Well I'll have to have a look at that. I didn't think it was possible.

Ta-darrrr......Star Trek with colour-changing LEDs.

https://youtu.be/QFOha-4xRnQ



VERY NICE! It may seem like simple thing at first...but it really adds to it! It also allows for game modes to change up depending on lighting.... hell I think you can change the textures on the decals too if you want!

I've always wondered if there was a way to use Overlays or Holograms for decals...but be able to "turn them off" or dim them automatically when the insert goes off etc..

The spring effect is nice! Is that using BAM magnets as part of that?

Yah, moving hardware flashers can do some neat stuff, especially when the global lighting is off or very low....the hard part is hiding that center glow


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 2:59 pm 
Offline

Joined: Wed Nov 17, 2010 7:41 pm
Posts: 947
TerryRed wrote:
We really need a good example of bump / normal mapping combined with the newer lighting control to show off what can be done. Something like Apollo 13's moon with bumped craters and "sun" lighting could look really nice.


That's on my to-do list...bump mapping for models. It's hard to believe the demo table Rav created for bump mapping was a few years ago now and yet no one has created bump mapped, fully detailed models for FP yet (AFAIK). We need a modelling guy to join the team, I would love me some bump mapping on my Vengeance toy.


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 3:06 pm 
Online

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2850
Location: Ontario, Canada
SLAMT1LT wrote:
Wow.....well that changes everything! Movable hardware lighting....now that is impressive. I did try and capture a nano flasher for my Blade Runner Police Spinner demo but it wouldn't work. I need to revisit this.


I was able to do it...but it may be easiest to put a regular flasher or at least one you can see
more readily and grab that and then go back to table editor and swap the model to nano after the fact....

I think what I did then to refine it further, in the MP menu was temporarily increase the z number in target box to elevate the flasher way above above everything else so you can see it and then shrink the capture box to smallest possible.

then return target z value back to desired destination....


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 3:15 pm 
Offline

Joined: Wed Nov 17, 2010 7:41 pm
Posts: 947
Gimli wrote:
I was able to do it...but it may be easiest to put a regular flasher or at least one you can see
more readily and grab that and then go back to table editor and swap the model to nano after the fact....

I think what I did then to refine it further, in the MP menu was temporarily increase the z number in target box to elevate the flasher way above above everything else so you can see it and then shrink the capture box to smallest possible.

then return target z value back to desired destination....


That might work. I could easily capture the light bulbs using this same technique, so the flasher should work.

I'm certainly going to play with this tomorrow and see what I can do, so expect more silly YouTube vids!


TerryRed wrote:

The spring effect is nice! Is that using BAM magnets as part of that?

Yah, moving hardware flashers can do some neat stuff, especially when the global lighting is off or very low....the hard part is hiding that center glow


The spring is created by the mini playfield feature. Gimli created it, I just added more variations.

I haven't figured out how to hide the obvious ball of light that is projected on the walls and on the playfield surface from a hardware light source. It's all smoke and mirrors so I'll have to figure out a magic trick to hide it.


Top 
 Profile  
 
 Post subject: Re: Better Arcade Mode - MOD for Future Pinball
 Post Posted: Mon Sep 02, 2019 3:30 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2510
Location: Arkansas, USA
SLAMT1LT wrote:
I'm getting a mediation error relating to the dynamic flippers, as soon as I add 'xBAM.CreateAllExt' to the code. There's a conflict there somewhere.


Slam,

If you want the simple answer just delete this code in the "BAM_Init" subroutine but leave the coding for any shadow maps you have:

Set RightFlipperExt = xBAM.Flipper("RightFlipper")
Set LeftFlipperExt = xBAM.Flipper("LeftFlipper")


If you have more than 2 flippers, delete it for all flippers.

You can delete these dims also but it will still work without deleting them:

Dim RightFlipperExt,LeftFlipperExt

George


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 2242 posts ]  Go to page Previous  1 ... 195, 196, 197, 198, 199, 200, 201 ... 225  Next

Board index » Future Pinball » BAM corner


Who is online

Users browsing this forum: No registered users and 10 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: