Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » BAM corner




Post new topic Reply to topic  [ 34 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Bam Ball shadow
 Post Posted: Wed Mar 06, 2019 9:00 pm 
Offline
User avatar

Joined: Mon Aug 15, 2011 10:02 am
Posts: 1886
Location: Argentina
Maybe allready exist
Use xbam globalpositon a toy with texture and a clock

Attachment:
sha.jpg


Table demo
https://mega.nz/#!adYHgShZ!8L4eUg88hbXf ... 7m38AMinLM


You do not have the required permissions to view the files attached to this post.


Top 
 Profile  
 
 Post subject: Re: Bam Ball shadow
 Post Posted: Wed Mar 06, 2019 11:13 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2483
Location: Arkansas, USA
I don't think it has been done before. A ball shadow is pretty cool.

George


Top 
 Profile  
 
 Post subject: Re: Bam Ball shadow
 Post Posted: Thu Mar 07, 2019 12:13 am 
Offline
User avatar

Joined: Mon Aug 15, 2011 10:02 am
Posts: 1886
Location: Argentina
In the script there are some minus at the x and y position, it is the size of the playfield/2

If it only can adjust the toy size :twisted: it will be nice to adjust the size of the shadow if the ball are on a rail


Top 
 Profile  
 
 Post subject: Re: Bam Ball shadow
 Post Posted: Thu Mar 07, 2019 8:24 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2821
Location: Ontario, Canada
Wonderful idea ! :shock:
Changing size and location of Toy Shadow definitely can be done.

I will show you how...

Francisco, you should learn how to use the "miniplayfield" feature of BAM.
It was designed for grabbing a small playfield and scaling it and moving it onto
the table.

But you can grab anything or group of things on and off the table .

In this case you grab the shadow toy inside a miniplayfield box and attach it to the tracked ball.

Because it is now a "miniplayfield" , you can use the miniplayfield code to change its
size and location in the code...

viewtopic.php?nomobile=1&f=55&t=6587&p=85768#p85768



Last edited by Gimli on Thu Mar 07, 2019 11:47 am, edited 1 time in total.

Top 
 Profile  
 
 Post subject: Re: Bam Ball shadow
 Post Posted: Thu Mar 07, 2019 10:03 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2821
Location: Ontario, Canada
here is a demo table
I couldn't see your invisible shadow , so I put a grey colored light on playfield overtop of your
toy...
https://www.dropbox.com/s/k3cdmy0ayxapt ... 2.fpt?dl=0

To Change Size, you can use:

Code:
MiniPlayField_0.Scale = Number


Addendum:
I just updated the above link
If you press "B" on keyboard it should change shadow size
I used this code:

Code:
Dim ShadSize
' The User Has Pressed A Key on the Keyboard..
'
Sub FuturePinball_KeyPressed(ByVal KeyCode)
   'AddDebugText "KeyCode = " & KeyCode
   'AddDebugText "Titled = " & fpTilted
   '
   ' Process any keys which are valid at all times
   '
   If keycode = 48 then
      ShadSize = ShadSize + 1
      If ShadSize = 7 then ShadSize = 1
      If ShadSize = 1 then miniplayfield_0.Scale = 0.3
      If ShadSize = 2 then miniplayfield_0.Scale = 0.6
      If ShadSize = 3 then miniplayfield_0.Scale = 1
      If ShadSize = 4 then miniplayfield_0.Scale = 1.3
      If ShadSize = 5 then miniplayfield_0.Scale = 1.6
      If ShadSize = 6 then miniplayfield_0.Scale = 2
   End if


Last edited by Gimli on Thu Mar 07, 2019 11:26 pm, edited 1 time in total.

Top 
 Profile  
 
 Post subject: Re: Bam Ball shadow
 Post Posted: Thu Mar 07, 2019 10:49 pm 
Offline
User avatar

Joined: Mon Aug 15, 2011 10:02 am
Posts: 1886
Location: Argentina
Thanks for looking it and the reply

O i see, correct me if I wrong, the toy must be inside the miniplayfield all the time, and now the miniplayfield going to follow the ball as be his shadow?


Top 
 Profile  
 
 Post subject: Re: Bam Ball shadow
 Post Posted: Thu Mar 07, 2019 11:22 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2821
Location: Ontario, Canada
francisco666 wrote:
Thanks for looking it and the reply

O i see, correct me if I wrong, the toy must be inside the miniplayfield all the time, and now the miniplayfield going to follow the ball as be his shadow?


Correct !
Pretty cool !
You can attach anything you want
A shadow is very useful , great idea !


Top 
 Profile  
 
 Post subject: Re: Bam Ball shadow
 Post Posted: Fri Mar 08, 2019 12:46 am 
Offline
User avatar

Joined: Mon Aug 15, 2011 10:02 am
Posts: 1886
Location: Argentina
Mmm Im having some problems with this, the toy cant be found when when I use MiniPlayField_0.Position., :?

Edit 1-2: for some reasom the toy is not visible if it is under the ball when using the miniplayfield or not :? Could it be the tga transparent?

Also why the miniplayfield are not traking the ball? Is moving but not allways under the ball


Top 
 Profile  
 
 Post subject: Re: Bam Ball shadow
 Post Posted: Fri Mar 08, 2019 11:27 am 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 2821
Location: Ontario, Canada
francisco666 wrote:
Mmm Im having some problems with this, the toy cant be found when when I use MiniPlayField_0.Position., :?

Edit 1-2: for some reasom the toy is not visible if it is under the ball when using the miniplayfield or not :? Could it be the tga transparent?


I had the same problem. Try making a visible shadow toy

francisco666 wrote:
Also why the miniplayfield are not traking the ball? Is moving but not allways under the ball

Yes, I agree that the shadow isn't always under the ball, but that would be the case with a shadow based on light source...
You can play around with the position of the shadow as shown in the video below.
I used my cheatcode to change the scale of the shadow, but you can also adjust the scale on the fly from the BAM menu
When happy , you need to press control C in upper half of Miniplayfield menu to create
a new Dim Miniplayfield_0 and a new Set Miniplayfield_0

https://youtu.be/r9c4JTc5EFY


Top 
 Profile  
 
 Post subject: Re: Bam Ball shadow
 Post Posted: Fri Mar 08, 2019 7:36 pm 
Offline
User avatar

Joined: Mon Aug 15, 2011 10:02 am
Posts: 1886
Location: Argentina
Whell after hours of try and error I foynd that the Center miniplayfield coordenates was the ones doing the mess.

I dont know how to calculate in a proper way, I just adjust it in q dev option untill I get the values ones, or so I think :lol:

The main thing of doing it with minipfs is to reduce the size of the shadow so when the ball are in ramps it drop a smaller shadow on playfield, I try with a fail of the 99.99% with a error of 0.01%. Shadow dont stay in playfield, I have foresee that in my mind, but couldnt script in a proper way and the shadows dont get smaller :roll:

So far:
https://mega.nz/#!aE5ETayY!ZYEZXUi7jdOD3BkFIs0-7ChmlOlSBOT4OktAtc3bpZ4

For now I have a "momentary" roll back to square 1, use the old script and using the texture change so I change the shadowToy texture if its on the rail or on the ground


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 34 posts ]  Go to page 1, 2, 3, 4  Next

Board index » Future Pinball » BAM corner


Who is online

Users browsing this forum: No registered users and 4 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: