Register    Login    Forum    FAQ    PinSimDB.org

Board index » Future Pinball » Tables WIP




Post new topic Reply to topic  [ 107 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11  Next
Author Message
 Post subject: Re: JungleGirl (WIP)
 Post Posted: Mon Feb 03, 2020 4:29 pm 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 477
Location: Abbotsford
Do you have the actual code for that? I'm very visual, so my ideas usually come if I see it working.
I usually set one property to use for walls etc so the ball hits dead, and also helps with ball movement around curves, but fp gets so confused on what to do, especially if the ball is right at two completely different objects with different settings like plastic for one and rubber for another.

The simplest trick is to have a non rendered wall in place for the shots, but every once in awhile the ball can fly off at a bad angle, so if you have the code, maybe I can reduce the objects a bit more and use that free space on other things with the next table.

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: fpxEngine


Top 
 Profile  
 
 Post subject: Re: JungleGirl (WIP)
 Post Posted: Mon Feb 03, 2020 5:22 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2777
Location: Arkansas, USA
I ended up using this but would be interested in seeing Gimli's code.

If xBAM.Ball.Speed <= 600 then TrigWall1.Collidable=false
If xBAM.Ball.Speed > 600 then TrigWall1.Collidable=true


Top 
 Profile  
 
 Post subject: Re: JungleGirl (WIP)
 Post Posted: Mon Feb 03, 2020 5:59 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 3051
Location: Ontario, Canada
blue wrote:
Do you have the actual code for that? I'm very visual, so my ideas usually come if I see it working.
I usually set one property to use for walls etc so the ball hits dead, and also helps with ball movement around curves, but fp gets so confused on what to do, especially if the ball is right at two completely different objects with different settings like plastic for one and rubber for another.

The simplest trick is to have a non rendered wall in place for the shots, but every once in awhile the ball can fly off at a bad angle, so if you have the code, maybe I can reduce the objects a bit more and use that free space on other things with the next table.


If you download Wilds NES you will see it in action....

Code:
'------------------------------------------------------------------
'Custom Wall
'------------------------------------------------------------------   
'nota: il "xBAM.Physics.SetMaterial",non và messo dentro una sub con HIT,perchè non funziona al primo colpo,ma al secondo.
'quidi valutare la funzionalità del muro.

Sub BAM_Init()
  xBAM.Physics.SetMaterial "wall1", 0.8, 0.2'-----slingshot sx in-play
  xBAM.Physics.SetMaterial "wall2", 0.8, 0.2'-----slingshot dx in-play
  xBAM.Physics.SetMaterial "wall3", 0.8, 0.2'-----------------------------------------------slot-machine in-play
  xBAM.Physics.SetMaterial "wall4", 2.0, 0.2'--------------------------mp laterale basso sx
  xBAM.Physics.SetMaterial "wall5", 1.5, 0.2'------mp laterale alto sx
  xBAM.Physics.SetMaterial "wall6", 1.5, 0.2'------mp laterale alto dx
  xBAM.Physics.SetMaterial "wall7", 1.0, 0.2'---------------------------in zona uscita viola in-play
  xBAM.Physics.SetMaterial "wall8", 0.5, 0.2'------mp alto sx
  xBAM.Physics.SetMaterial "wall9", 0.5, 0.2'------mp alto dx
  xBAM.Physics.SetMaterial "wall10", 3.5, 0.2'---------------------------------------------in alto sx in-play
  xBAM.Physics.SetMaterial "wall11", 1.5, 0.2'---------------------------------------------in alto dx in-play
  xBAM.Physics.SetMaterial "wall12", 1.0, 0.2'----------------------in tragets 1-7 in-play
  xBAM.Physics.SetMaterial "wall13", 2.5, 0.2'------mp zona exit sx
  xBAM.Physics.SetMaterial "wall14", 2.5, 0.2'------mp zona exit dx
  xBAM.Physics.SetMaterial "wall15", 2.5, 0.2'------mp zona exit sx
  xBAM.Physics.SetMaterial "wall16", 2.5, 0.2'------mp zona exit dx
  xBAM.Physics.SetMaterial "wall17", 2.0, 0.2'----------------------mp laterale basso dx
  xBAM.Physics.SetMaterial "wall18", 0.5, 0.2'-------------------------------------------mp alto cx
  xBAM.Physics.SetMaterial "wall19", 1.5, 0.2'------mp zona exit dx
  xBAM.Physics.SetMaterial "wall20", 1.5, 0.2'------mp zona exit sx
  xBAM.Physics.SetMaterial "wall21", 1.5, 0.2'------mp sotto mario

'questi di sotto,non funzionano come dovrebbero per il fatto che il collidable,non è sempre attivo.
'quindi funzionano con il elasticCoef standard in bam.
  xBAM.Physics.SetMaterial "muro1", 0.8, 0.2
  xBAM.Physics.SetMaterial "muro2", 0.8, 0.2
  xBAM.Physics.SetMaterial "muro3", 0.8, 0.2
  xBAM.Physics.SetMaterial "murosx", 0.8, 0.2
  xBAM.Physics.SetMaterial "murodx", 0.8, 0.2
'in questi il collidable è attivo,ma sono i muri sopra mario,che asseconda i movimenti sx-c-dx di mario,non restano collidable.
  xBAM.Physics.SetMaterial "fermo1", 1.0, 0.2
  xBAM.Physics.SetMaterial "fermo2", 1.0, 0.2
  xBAM.Physics.SetMaterial "fermo3", 1.0, 0.2
End Sub



Sub SpeedLimit(wallname, elasticCoef)
  ' configurable constants
  Const MinBallSpeed = 500.0   ' <-- chenge this value if needed
  Const MaxBallSpeed = 2000.0  ' <-- chenge this value if needed
  Const MaxElasticCoefWhenTilted = 0.5  ' <-- this elasticCoef will be used whet fpTilted = TRUE
  If fpTilted = TRUE OR StopWallBouncy=true AND elasticCoef > MaxElasticCoefWhenTilted Then
    elasticCoef = MaxElasticCoefWhenTilted
  End If
  Dim ballSpeed, speedPrec
  ballSpeed = xBAM.Ball.Speed
  If ballSpeed > MaxBallSpeed Then
    ballSpeed = MaxBallSpeed
  End If
  If ballSpeed < MinBallSpeed Then
   ballSpeed = MinBallSpeed
  End If
  speedPrec = (MaxBallSpeed - ballSpeed) / (MaxBallSpeed - MinBallSpeed)    ' speedPrec values, betewen 0...1 ,   =0 if ballSpeed = MaxBallSpeed and =1 if ballSpeed = MinBallSpeed (or less)
  speedPrec = 0.3 + 0.7 * speedPrec                         ' .... we want to have values in range 0.3 .... 1.0
  speedPrec = speedPrec * speedPrec                         ' take square value to make all "not linear", so at end we have value betwee 0.09 and 1.0. So if ball is at max speed decrease elasticCoef ~10 times

  xBAM.Physics.SetMaterial wallname, elasticCoef * speedPrec


  AddDebugText "ballSpeed = " & xBAM.Ball.Speed
  AddDebugText "speedPrec = " & speedPrec
  AddDebugText "ec = " & elasticCoef * speedPrec
End Sub


'---limita la velocità della palla,quando rimbalza su 2muri in continuazione,ho la palla esce fuori dai muri

'---------------------------------------in PLAY
'-----------------------slingshot
Sub wall1_prehit()
  SpeedLimit "wall1", 0.8
End Sub

Sub wall2_prehit()
  SpeedLimit "wall2", 0.8
End Sub

'-----------------------slot-machine
Sub wall3_prehit()
  SpeedLimit "wall3", 0.8
End Sub

'-----------------------in alto
Sub wall10_prehit()
  SpeedLimit "wall10", 3.5
End Sub

Sub wall11_prehit()
  SpeedLimit "wall11", 1.5
End Sub

'-----------------------target 1-7
Sub wall12_prehit()
  SpeedLimit "wall12", 1.0
End Sub

'-----------------------in zona exit viola
Sub wall7_prehit()
  SpeedLimit "wall7", 1.0
End Sub


'---------------------------------------------in MP

'-----------------------laterali alti
Sub wall5_prehit()
  SpeedLimit "wall5", 1.5
End Sub

Sub wall6_prehit()
  SpeedLimit "wall6", 1.5
End Sub

'-----------------------laterali bassi
Sub wall4_prehit()
  SpeedLimit "wall4", 2.0
End Sub

Sub wall17_prehit()
  SpeedLimit "wall17", 2.0
End Sub

'-----------------------in alto
Sub wall8_prehit()
  SpeedLimit "wall8", 0.5
End Sub

Sub wall9_prehit()
  SpeedLimit "wall9", 0.5
End Sub

Sub wall18_prehit()
  SpeedLimit "wall18", 0.5
End Sub

'--------------------zona exit sx
Sub wall15_prehit()
  SpeedLimit "wall15", 2.5
End Sub

Sub wall13_prehit()
  SpeedLimit "wall13", 2.5
End Sub

Sub wall20_prehit()
  SpeedLimit "wall20", 1.5
End Sub

'--------------------zona exit dx

Sub wall16_prehit()
  SpeedLimit "wall16", 2.5
End Sub

Sub wall14_prehit()
  SpeedLimit "wall14", 2.5
End Sub

Sub wall19_prehit()
  SpeedLimit "wall19", 1.5
End Sub

'--------------------sotto mario

Sub wall21_prehit()
  SpeedLimit "wall21", 1.5
End Sub

'-----------------------------------------precauzione
Sub fermo1_prehit()
  SpeedLimit "fermo1", 1.0
End Sub

Sub fermo2_prehit()
  SpeedLimit "fermo2", 1.0
End Sub

Sub fermo3_prehit()
  SpeedLimit "fermo3", 1.0
End Sub

Sub muro1_prehit()
  SpeedLimit "muro1", 0.8
End Sub

Sub muro2_prehit()
  SpeedLimit "muro2", 0.8
End Sub

Sub muro3_prehit()
  SpeedLimit "muro3", 0.8
End Sub


Sub murosx_prehit()
  SpeedLimit "murosx", 0.8
End Sub

Sub murodx_prehit()
  SpeedLimit "murodx", 0.8
End Sub


See here:
viewtopic.php?f=86&t=3249&p=86241&hilit=xBAM.Physics.SetMaterial#p86241


Code:
xBAM.Physics.SetMaterial "Objectname", elasticCoef, softnessCoef, staticFriction, kineticFriction


Top 
 Profile  
 
 Post subject: Re: JungleGirl (WIP)
 Post Posted: Mon Feb 03, 2020 7:30 pm 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 477
Location: Abbotsford
Thanks very interesting code. Have to have a good long look at this for the next table, but I'm pretty intent on getting the table out now as I'm heading on vacation to Mexico in a couple weeks. Still, when I am back in March, add this to the latest version of FPX (JG uses the first version, not the new releases) as well as all the other stuff I have learned.

More code added to thousands and thousands of code lines. Geez, still, very surprised on how capable the first version of fpxEngine actually is. Learned a lot as well on what needs to be done with a b16 release.

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: fpxEngine


Top 
 Profile  
 
 Post subject: Re: JungleGirl (WIP)
 Post Posted: Mon Feb 03, 2020 9:26 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2777
Location: Arkansas, USA
I might have a look at it tomorrow. It seems rather complex but maybe I can get through it.


Top 
 Profile  
 
 Post subject: Re: JungleGirl (WIP)
 Post Posted: Tue Feb 04, 2020 6:42 pm 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2777
Location: Arkansas, USA
Blue,

I haven't tried Gimli's code yet but I found something that works really well. I was experiencing the ball deflecting oddly when the target is hit on the sides with the wall in front of it. I changed the wall so it has 4 shape points and made the front of the wall flush with front of the target on the sides. Then it bows out in the center. I think it performs the way it should. I was surprised.

George

If xBAM.Ball.Speed <= 600 then
TrigWall1.Collidable=false
End If
If xBAM.Ball.Speed > 600 then
TrigWall1.Collidable=true
End If


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


Top 
 Profile  
 
 Post subject: Re: JungleGirl (WIP)
 Post Posted: Tue Feb 04, 2020 10:51 pm 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 477
Location: Abbotsford
It does. I have tried multiple shapes over the years for walls. Yours is very good for a center target bank. My 6 target bank target, because it's right at the side and shallow, throws the ball towards the top, so I came up with a wall shape to prevent that and have the ball stutter at a hit before it throws the ball out more to the center. Works most of the time at least, damn fp physics.

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: fpxEngine


Top 
 Profile  
 
 Post subject: Re: JungleGirl (WIP)
 Post Posted: Tue Feb 04, 2020 11:48 pm 
Offline

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 3051
Location: Ontario, Canada
It's not my code its Ravs :)
But I understand it I think...


Top 
 Profile  
 
 Post subject: Re: JungleGirl (WIP)
 Post Posted: Wed Feb 05, 2020 12:34 am 
Offline

Joined: Thu Aug 16, 2012 11:12 pm
Posts: 2777
Location: Arkansas, USA
I'm using it on Robots Invasion. There are 2 targets near the center of the table. When I used to hit them hard, the ball would bounce off too fast and usually drain. I'm not sure if I will post an update just for this.

Thanks for your help,

George


Top 
 Profile  
 
 Post subject: Re: JungleGirl (WIP)
 Post Posted: Wed Feb 05, 2020 4:54 pm 
Offline

Joined: Tue May 01, 2012 11:13 pm
Posts: 477
Location: Abbotsford
WIP Video of Jungle Girl fpx. Still a bit rough in places, most definitely needs some polish and a issue still to be corrected with the side targets custom physics and FP's inability to have a realistic bounce. (I did have to make major changes in the last month. geez...) Hopefully will get there soon enough, just don't think it's ready yet.


So, because I'm going on vacation very shortly, and won't be able to touch the game till March, Should I just release the game now rather than make people wait longer? Nothing really wrong with it, just minor stuff and more physics balancing and game play. What you guys think?


https://youtu.be/aStyCxwh0WQ


No comments on my game playing please. :)

Ball 3 is the multiball system. There's also a instant multiball from the skillshot, which is actually pretty easy (You can make it harder if you want)

_________________
_____________________________________

Latest projects and rants at My Facebook Page
_____________________________________

Latest Project: fpxEngine


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 107 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11  Next

Board index » Future Pinball » Tables WIP


Who is online

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