Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » Tables Release




Post new topic Reply to topic  [ 500 posts ]  Go to page Previous  1 ... 39, 40, 41, 42, 43, 44, 45 ... 50  Next
Author Message
 Post subject: Re: Slamtilt's new releases on his new website
 Post Posted: Sun Aug 25, 2019 2:45 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2756
Location: Ontario, Canada
Gimli wrote:

1. Jerkiness - Maybe can improved by using what Rav calls the "Newton Physics tick timer" instead of an FP timer that I used...


It Worked ! Newton Physics Tick, I believe is the hidden Newton Timer that FP uses and Rav has gained access too....he uses this with dynamic flippers and all of Bam monitoring stuff

...any way, when I assign T-Rex tracking using this it is perfectly smooth now !

Gimli wrote:
2. I think I can create a restricted field of view for T-Rex
turning him off/ on with "trigger optos" or whatever they are called

Yes ! Using Rav's demo code. I was able to assign rotations based on variable x position only and this prevents T-Rex's head from spinning around

Check out this Demo
It does exaclty what we want :
https://www.dropbox.com/s/oxa3vv0ckrsh2 ... t.fpt?dl=0

Here is the table with it implemented:
https://www.dropbox.com/s/xtp7onhj24w12 ... 3.fpt?dl=0

The next thing I can play with is having the T-Rex tilt his head up and down a little based on ball location and then play with the chomping animation and make him eat a pinball :D

Here's a link to actual table go to 5:10 of clip
https://youtu.be/QFmPMuNO7M8.
Easy peasy 8-)


Last edited by Gimli on Mon Aug 26, 2019 8:06 am, edited 2 times in total.

Top 
 Profile  
 
 Post subject: Re: Slamtilt's new releases on his new website
 Post Posted: Mon Aug 26, 2019 7:02 am 
Offline
User avatar

Joined: Sat Jan 29, 2011 4:54 pm
Posts: 1170
I wonder if a nice head, of joker (jack nicholson) that comes out of the playfield that laughs to satiety .... what effect would it make? :lol: :lol: :lol: :lol:

Bravo...Gimli,you are an artist with bam :D it makes me go crazy the T-rex that goes around :shock:


Top 
 Profile  
 
 Post subject: Re: Slamtilt's new releases on his new website
 Post Posted: Mon Aug 26, 2019 7:41 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2756
Location: Ontario, Canada
wild wrote:
I wonder if a nice head, of joker (jack nicholson) that comes out of the playfield that laughs to satiety .... what effect would it make? :lol: :lol: :lol: :lol:

Bravo...Gimli,you are an artist with bam :D it makes me go crazy the T-rex that goes around :shock:


Thanks Paolo !

Here is a video using Joker Head. I can definitely make him come out of playfield
https://youtu.be/D8t-E76EiLs


Top 
 Profile  
 
 Post subject: Re: Slamtilt's new releases on his new website
 Post Posted: Mon Aug 26, 2019 10:00 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2331
Location: Arkansas, USA
I don't know what a "Newton Physics tick timer" is but it doesn't seem to affect the physics of the ball as far as I can tell.

It looks really good. I think Slam will like it.

To be honest, I'm not sure I would play it this way though. It is almost too much of a distraction but then I am used to it having no movement. I sort of wish it moved like it does on the real table but Slam said he didn't want it like that.

George


Top 
 Profile  
 
 Post subject: Re: Slamtilt's new releases on his new website
 Post Posted: Mon Aug 26, 2019 10:48 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2756
Location: Ontario, Canada
GeorgeH wrote:
I don't know what a "Newton Physics tick timer" is but it doesn't seem to affect the physics of the ball as far as I can tell.

It looks really good. I think Slam will like it.

To be honest, I'm not sure I would play it this way though. It is almost too much of a distraction but then I am used to it having no movement. I sort of wish it moved like it does on the real table but Slam said he didn't want it like that.

George


The "Newton Physics Tick" as far as I can tell is the internal physics processing timer for future pinball whereas other timers are the ones that we create in table editor, which have lowest refresh setting of 10 ms ( you can test this in table editor the lowest timer interval you can enter is 10).

You will see in some of the code that Rav has provided that we have something like this:

Code:
Sub NewtonPhysicsTick()
   
   Dim ball
   Set ball = xBAM.BallCloseTo(0,0)
   
      'AddDebugText "ball.Speed: " & ball.Speed
      AddDebugText "xBAM.Ball.Velocity.y: " & xBAM.Ball.Velocity.y
      'AddDebugText "xBAM.Ball.Position.Y: " & xBAM.Ball.Position.Y
      'AddDebugText "xBAM.Ball.Velocity.X: " & xBAM.Ball.Velocity.X
      'AddDebugText "xBAM.Ball.Position.X: " & xBAM.Ball.Position.X

End Sub


Rav has enabled BAM to recognize the above code to access the "NewtonPhysicsTick"
and if you copy this code into any table and play in debug mode ,by pressing F9 from table editor, it will show "Y velocity" of the ball.

If you use the mouse roller function to move ball up and down, you will see that as the ball moves up the table the "y velocity" is negative ( less than zero) and as the ball moves
down the table towards you the "y velocity" is positive"

You can use the above code to test for ball speed, x and y velocity and x and y position of the ball, by removing the apostrophes in the code. You can actually enter any of the physics parameters that BAM monitors in this same way .

You can use these values how you want relative to game events and in our case T-Rex Position.

With T-Rex I chose to monitor some other parameters like the rotation angle of Target1 (T-Rex) and to activate/alter tracking if the ball is in a certain position on the table.

This is the code along with the math code below is all you require make a "drop target" model of any kind rotate and track the ball.


Code:
Dim TrackedBall
Set TrackedBall = Nothing

Sub NewtonPhysicsTick()
    Dim ball
   Set ball = xBAM.BallCloseTo(0,0)
   Set TrackedBall = xBAM.BallCloseTo(PlungerKicker.X, PlungerKicker.Y)
      DropTarget1.Rotation =  Atn2(TrackedBall.PositionGlobal.X - DropTarget1.X, DropTarget1.Y)
      
      
End Sub


To explain this code:

1. Dim ball
Set ball = xBAM.BallCloseTo(0,0)

This seems to declare that we will be monitoring a ball ,
Position x = 0, y = 0 is the top left corner of the table
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

2. Set TrackedBall = xBAM.BallCloseTo(PlungerKicker.X, PlungerKicker.Y)
This tells BAM which ball to track.
In Jurassic park , you want it track the next ball coming out of
the plunger kicker. Otherwise it will track the closest ball, which in Jurassic park is the "captive ball" that you hit during the game.

When the ball is destroyed in various kickers, tracking automatically stops and restarts
when released from a new kicker elsewhere.

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
3. DropTarget1.Rotation = Atn2(TrackedBall.PositionGlobal.X - DropTarget1.X, DropTarget1.Y)

This is the magic that moves T-Rex :shock:
DropTarget1 IS the T-Rex Model ( Slam is using a model that is assigned as a drop target)

FP coding allows setting of drop target rotations.. and the above code does a math calculation that changes drop target rotation based on where the tracked ball is relative to the T-Rex model. To prevent T-rex from spinning all the way around, I keep the 'Y' variable constant ie. that of the T-Rex (DropTarget.Y number is always the same).
So the Y Tracking result is relative to the position of T-Rex only and not relative to the difference between the tracked ball and T-Rex.

The 'X' Variable is changing based on the difference 'TrackedBall.PositionGlobal.X' and "T-Rex x position"

This makes him swing left and right only and not up and down....

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Rav previously provided the math conversion in a demo table with this additional code (I don't understand it really, but it works great :lol: )

Code:
Dim RadToDeg
RadToDeg = 57.295779513082320876798154814105

Function Atn2(x, y)
   If x > 0 Then
      Atn2 = Atn(y / x) * RadToDeg
   ElseIf x < 0 Then
      Atn2 = Sgn(y) * (180 - RadToDeg * Atn(Abs(y / x)))
   ElseIf y = 0 Then
      Atn2 = 0
   Else
      Atn2 = 180
   End If
   Atn2 = Atn2+90
End Function

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Then for added functionality I later grabbed T-Rex in an MP, so I can fine tune his position.
but the tracking will work without the Miniplayfield stuff....

I can likely code it more like the real table to make it look cruder and more mechanical or I can refine it further...but I really like how responsive it actually is...thanks Rav !


Last edited by Gimli on Mon Aug 26, 2019 5:13 pm, edited 1 time in total.

Top 
 Profile  
 
 Post subject: Re: Slamtilt's new releases on his new website
 Post Posted: Mon Aug 26, 2019 3:21 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2756
Location: Ontario, Canada
Sorry to beat a dead horse, but just to show how easy it is to do....I converted Vengeance from Star Trek, a Snake and biplane from IJ to Drop Targets using fpm-editor.exe and coded them all to rotate at once with the ball...
Here is the demo table...
https://www.dropbox.com/s/qzphm0m59242p ... 2.fpt?dl=0

Here is the code :
Code:

' ==================================== BAM Ball Tracking Demo ======================

Dim TrackedBall
Set TrackedBall = Nothing

Sub NewtonPhysicsTick()
    Dim ball
   Set ball = xBAM.BallCloseTo(0,0)
   If not (TrackedBall is Nothing ) then
      DropTarget1.Rotation = 180 + Atn2(TrackedBall.PositionGlobal.X - DropTarget1.X, DropTarget1.Y) 'Cobra
      DropTarget2.Rotation =  150 + Atn2(TrackedBall.PositionGlobal.X - DropTarget2.X, DropTarget2.Y) 'Biplane
      DropTarget3.Rotation = 225 + Atn2(TrackedBall.PositionGlobal.X - DropTarget3.X, DropTarget3.Y) 'T-Rex
      DropTarget4.Rotation = 75 + Atn2(TrackedBall.PositionGlobal.X - DropTarget4.X, DropTarget4.Y) 'Vengeance
   End if
End Sub



' Helper function: convert relative position to angle
Dim RadToDeg
RadToDeg = 57.295779513082320876798154814105

Function Atn2(x, y)
   If x > 0 Then
      Atn2 = Atn(y / x) * RadToDeg
   ElseIf x < 0 Then
      Atn2 = Sgn(y) * (180 - RadToDeg * Atn(Abs(y / x)))
   ElseIf y = 0 Then
      Atn2 = 0
   Else
      Atn2 = 180
   End If
   Atn2 = Atn2+90
End Function

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


You will see with each model I added a number like 180 to the drop target rotation calculus..
this was just to correct for the rotation that each model file had to begin with ...this was a trial and error process until the right correction was added


I also added the condition " If not (TrackedBall is Nothing ) then " to the code
so tracking can be switched on and off.
This is a weird code that Rav used , with a double negative grammar....but it works , so who cares :lol:

'b' on keyboard turns tracking off
Code:
Set TrackedBall = Nothing


'v' on keyboard turns tracking back on

Code:
Set TrackedBall = xBAM.BallCloseTo(PlungerKicker.X, PlungerKicker.Y)


Top 
 Profile  
 
 Post subject: Re: Slamtilt's new releases on his new website
 Post Posted: Tue Aug 27, 2019 8:18 am 
Offline

Joined: Wed Nov 17, 2010 7:41 pm
Posts: 947
I'm back from my little break.

I can see you've been busy Gimli....incredible work. I played the demo table and the T-Rex is doing pretty much what I wanted him to do. Some refinement is needed in the code to make him behave more naturally but I think I can make this work. And if I can't, I'll just revert to simple movements based on switch hits, which is how the Captain B Zarr toy works in Party Zone.

And thanks for all the detailed information, it's helps a lot when figuring this stuff out.

I was itching to get back from my break so I could start playing with mini playfields again. I had time to think of some new ideas and today I put one idea into practice. I'm producing a short video to show it off, which I'll upload later.

I've also improved how the Vengeance reacts in Star Trek, adding more randomness to it's wobble, which is important when selling the illusion that you've just hit a big toy on a spring.


Top 
 Profile  
 
 Post subject: Re: Slamtilt's new releases on his new website
 Post Posted: Tue Aug 27, 2019 9:32 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2756
Location: Ontario, Canada
SLAMT1LT wrote:
I'm back from my little break.

I can see you've been busy Gimli....incredible work. I played the demo table and the T-Rex is doing pretty much what I wanted him to do. Some refinement is needed in the code to make him behave more naturally but I think I can make this work. And if I can't, I'll just revert to simple movements based on switch hits, which is how the Captain B Zarr toy works in Party Zone.

And thanks for all the detailed information, it's helps a lot when figuring this stuff out.


No problem. I am glad it helps. BTW I have just about got T-Rex eating the ball like the real table...I'll post a demo table later today I hope.
SLAMT1LT wrote:
I was itching to get back from my break so I could start playing with mini playfields again. I had time to think of some new ideas and today I put one idea into practice. I'm producing a short video to show it off, which I'll upload later.

Awesome SLAM ! This feature with your creativity will be amazing !

SLAMT1LT wrote:
I've also improved how the Vengeance reacts in Star Trek, adding more randomness to it's wobble, which is important when selling the illusion that you've just hit a big toy on a spring.


It may not be worth your while but you can adjust the spring response based on ball speed

If you add this code to top of script and load game in debug mode it will show ball speed:

Code:
Sub NewtonPhysicsTick()
   
   Dim ball
   Set ball = xBAM.BallCloseTo(0,0)
   AddDebugText "ball.Speed: " & ball.Speed
    End Sub


Then you can code the spring to have different values based on ball speed
Code:
If ball.Speed > 500 then bla bla bal:Exit Sub
If ball.Speed > 300 then bla bla bal:Exit Sub
If ball.Speed > 0 then bla bla bal:Exit Sub
 


SLAMT1LT wrote:
Now that's cool...2 very nice models he's created there. Much better than the real machine! Thanks.

I couldn't get the ramp magnet to work on F-14 but it's not a big issue, I just wanted a super fast launch but fast is good enough for now.

I'm releasing F-14 TomCat ULTIMATE Pro tomorrow so you can see for yourself.


I think you have to have this in code as well as what I said before....so that BAM is tracking although I may be wrong
Code:
Sub NewtonPhysicsTick()
   
   Dim ball
   Set ball = xBAM.BallCloseTo(0,0)
 
    End Sub


Top 
 Profile  
 
 Post subject: Re: Slamtilt's new releases on his new website
 Post Posted: Tue Aug 27, 2019 11:45 am 
Offline

Joined: Wed Nov 17, 2010 7:41 pm
Posts: 947
Thanks. I'll play around with this and see what I come up with.


Top 
 Profile  
 
 Post subject: Re: Slamtilt's new releases on his new website
 Post Posted: Tue Aug 27, 2019 12:19 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2756
Location: Ontario, Canada
oops, you need the "Dim ball" outside of sub
Here is lamo demo where different lights go on based on ball speed when they hit triggeropto
https://www.dropbox.com/s/2suggpddsef02 ... d.fpt?dl=0

Code:
Dim ball
Sub NewtonPhysicsTick()
   
   
   Set ball = xBAM.BallCloseTo(0,0)
   AddDebugText "ball.Speed: " & ball.Speed
   
    End Sub


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 500 posts ]  Go to page Previous  1 ... 39, 40, 41, 42, 43, 44, 45 ... 50  Next

Board index » Future Pinball » Tables Release


Who is online

Users browsing this forum: Google [Bot] 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:  
cron