Jump to content



Photo
- - - - -

Spy vs. Spy WIP


  • Please log in to reply
147 replies to this topic

#1 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 27 March 2010 - 06:38 PM

I was trying to think of a way to get my wife to play more pinball with me...

I have seen some videos on Youtube of the 'Joust' Pinball machine, but I have never had the opportunity to play one. I gave up on my Bartender table, and thought that I would try something new and build a 2 player head to head machine.

I have most of the table layed out, and some of the graphics and scripting started. It is a very basic table, so it should not take me too long to complete this.

If you own a cabinet, you are going to need 2 flipper buttons on each side of your cabinet to play this table. I wasn't sure how comfortable it would be to use only one hand to control both the left and right flippers on each side, but suprisingly I found it fairly easy! (You are also welcome to snuggle next to your wife at the keyboard and play in 4:3 smile.gif )

Rules (so far):

- The goal of the game is to beat your opponent to 10 points.
- At the start of the game, a ball falls from the top kicker on each side. There are always 2 balls in play.
- If you score on your opponent, then a new ball will drop on his side.
- Enter the top kicker on your side to put up the drop target defence on the oppents side.
- Light both bottom kicker holes on your side to lift the pop-up bumper between the bottom flippers on your side
- Your bottom kicker holes extiguish the other players kicker hole lights. You must have them both lit to have the pop-bumper up.
- Thinking of something to add near the top.

Here is a screenshot of what I have so far running on my cab:

EDIT: Screenshot deleted, due to outdatedness.

Latest Youtube video (last one until release) smile.gif






I am hoping that it will be a fun table to involve your friends and family in some head to head competition. smile.gif

more to come.... (Ideas are welcome!)


Updated WIP / April 27:



 


#2 pinball buzz

pinball buzz

    Pinball Fan

  • VIP
  • 823 posts
  • Location:United Kingdom

  • Flag: United Kingdom

  • Favorite Pinball: TOM



Posted 27 March 2010 - 07:17 PM

Nice idea Rawd - if I think of something for the top area will let you know. cool.gif

Cheers Buzz
Pinball Buzz - Builder of pinball cabs since May 2008.

See my cab pictures here

http://www.flickr.co...s/94649948@N00/
[/size][/size]

#3 Wizards_Hat

Wizards_Hat

    Pinball Fan

  • VP Dev Team
  • PipPipPipPip
  • 1,258 posts
  • Location:Manchester, UK

  • Flag: United Kingdom

  • Favorite Pinball: STTNG




  • Trophies:

Posted 27 March 2010 - 07:19 PM

QUOTE (Rawd @ Mar 27 2010, 06:38 PM) <{POST_SNAPBACK}>
I have seen some videos on Youtube of the 'Joust' Pinball machine, but I have never had the opportunity to play one.

Joust was the original inspiration for my head-to-head VP table (Hat-Trick) [for VP8] - like you I've never had chance to play one (when I started my table in 2001, there was no video...YouTube didn't exist...I had only seen pictures of it!)
I started it out as a completely 2-player game, but then as I was writing it and testing it, I started adding more & more A.I. in, and now it's brilliant to play against the computer, or against another human (it will play itself if you want it to) - I got that obsessed with the 1-player version that there is now more to do in that than the 2-player mode (playing full seasons including league & cup games). My intention is to upgrade to a VP9 "World Cup" version before the summer smile.gif

I know yours is FP, not VP...but if there's any code, or anything else that may inspire you that you want to copy from mine...please help yourself.

I keep wondering if it would be possible to do a head-to-head game over the net via VP-Plus...just haven't had time to check it out in any detail (maybe another summer project smile.gif )

Good luck with finishing this table off - Spy Vs Spy is a great theme smile.gif - keep us posted on progress.

Regards,
Dan.
A wizard only needs one ball...but can handle six.

#4 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 27 March 2010 - 08:41 PM

Very cool Dan, thanks! I didn't know that your head to head table existed, I will definately check it out.

I put a "half spinner" near the top, with another way to enter the opponents side. Hit the target on your side to change the direction of the spinner, and gain an advantage.

To do:

- make sure that both sides are perfectly symmetrical, and play is smooth.
- Add lights, more graphics, and sounds
- script a few kickers and targets
- script scoring and Game over


Problem:

When a new ball is created on either of my top kickers, the game will stutter, or jump a few frames. Any idea why this is?


 


#5 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 27 March 2010 - 09:25 PM

Here is my added spinner and entry point.

You can see the rules are very simple. I hope it is fun to play!




 


#6 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 27 March 2010 - 09:56 PM

So, I am trying to get my kickers to reverse the direction of the spinner. I am getting confused.

Here is my script:

Sub Kicker3_Hit()
Kicker3.SolenoidPulse (300)

SpinningDisk1.solenoidon()
End Sub




Sub Kicker4_Hit()
Kicker4.SolenoidPulse (300)

SpinningDisk1.solenoidon()

SpinningDisk1.AntiClockwise = true

End Sub



This seems to work for the most part but....

If I enter kicker 3 first, it spins clockwise (correct)
If I enter kicker 4 second, it reverses direction and spins counter-clockwise (correct)
When entering kicker 3 AGAIN (after this sequence), the spinner does not change direction. (Incorrect)

If I enter Kicker 4 first, it spins counter-clockwise (correct)
If I enter Kicker 3 second, it does not reverse direction (incorrect).

(BASICALLY Kicker 4 will reverse the direction, but kicker 3 will not)

It must be something simple in my script. Any help is appreciated.

(I tried turning the disc solenoid off, and then back on in the script with the same results)


 


#7 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 27 March 2010 - 10:06 PM

Bah! It was easy...

Sub Kicker3_Hit()
Kicker3.SolenoidPulse (300)

SpinningDisk1.solenoidon()

SpinningDisk1.AntiClockwise = false
End Sub




Sub Kicker4_Hit()
Kicker4.SolenoidPulse (300)

SpinningDisk1.solenoidon()

SpinningDisk1.AntiClockwise = true

End Sub


 


#8 vic viper

vic viper

    Pinball Fan

  • Silver Supporter
  • 516 posts
  • Location:Planet Gradius

  • Flag: ---------

  • Favorite Pinball: Xenon, Firepower, Elvis, Gradius (original), Zarza

Posted 27 March 2010 - 11:22 PM

Looks pretty neat.
SHOOT THE CORE

#9 bc57

bc57

    Hobbyist

  • Members
  • PipPip
  • 26 posts
  • Location:N.C. USA

  • Flag: United States of America

  • Favorite Pinball: 72 Bally Fireball

Posted 28 March 2010 - 01:25 AM

If only you could rig it so when you reach a certain number of points your opponents ball blows up, that would be just like spy vs spy. Will you be using a white ball and black ball for each spy? Nice theme for a table...I've still got a few spy vs spy compilation books I bought when I was a kid.


#10 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 28 March 2010 - 03:48 AM

QUOTE (bc57 @ Mar 27 2010, 07:25 PM) <{POST_SNAPBACK}>
If only you could rig it so when you reach a certain number of points your opponents ball blows up, that would be just like spy vs spy. Will you be using a white ball and black ball for each spy? Nice theme for a table...I've still got a few spy vs spy compilation books I bought when I was a kid.


I am sure that you could probably make a ball explode fairly easily with FP.

Each time you score a point, I plan on having a graphic on the backglass (possibly DMD) with a wick burning closer to your opponents bomb. When you win, the bomb will explode.

I was also thinking of using black and white balls. The thing is, the balls transfer sides, so your color will not stay on your side.. and there are always 2 balls on the table. I still may do it, just to see how it looks.. but I will most likely stick with silver. Hey.. maybe the 10th ball on each side can be the Black or White ball! (the winning ball)




A little stuck again (sorry.. pretty new at this scripting).

I figured out how to get my pop-up bumper to come up IF I have both lights on...


sub Pop1()
If (light1.State = BulbOn) and (light2.state = BulbOn) Then popup1.solenoidOn
end sub

Sub Pop2()
If (light3.State = BulbOn) and (light4.state = BulbOn) Then popup2.solenoidOn
end sub




Sub Kicker5_Hit()
Kicker5.SolenoidPulse (300)
light1.state=bulbon
light3.state=bulboff
Pop1()
End Sub


sub Kicker6_Hit()
Kicker6.SolenoidPulse (300)
light2.state=bulbon
light4.state=bulboff
Pop1()
End Sub

Sub Kicker7_Hit()
Kicker7.SolenoidPulse (300)
light3.state=bulbon
light1.state=bulboff
pop2()
End Sub

Sub Kicker8_Hit()
Kicker8.SolenoidPulse (300)
light4.state=bulbon
light2.state=bulboff
pop2()
End Sub



So.. when I enter any of the four kickers, it checks to see if the 2 lights are on in order to turn on the appropriate popbumper solenoid. That works great!

BUT... I want the solenoid to turn OFF when the lights are not lit. How do I get the script to constantly check the lights to turn off the solenoid? Am I going about this in the wrong way? Any help is appreciated.


 


#11 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 28 March 2010 - 04:04 AM

I figured it out... (I am only posting this incase others are interested how this stuff works)


Sub Pop1()
If (light1.State = BulbOn) and (light2.state = BulbOn) Then popup1.solenoidOn

If (light1.State = BulbOff) and (light2.state = BulbOn) Then popup1.solenoidOff

If (light1.State = BulbOn) and (light2.state = BulbOff) Then popup1.solenoidOff

If (light1.State = BulbOff) and (light2.state = BulbOff) Then popup1.solenoidOff
end sub



Sub Pop2()
If (light3.State = BulbOn) and (light4.state = BulbOn) Then popup2.solenoidOn

If (light3.State = BulbOff) and (light4.state = BulbOn) Then popup2.solenoidOff

If (light3.State = BulbOn) and (light4.state = BulbOff) Then popup2.solenoidOff

If (light3.State = BulbOff) and (light4.state = BulbOff) Then popup2.solenoidOff

end sub








Sub Kicker5_Hit()
Kicker5.SolenoidPulse (300)

light1.state=bulbon
light3.state=bulboff


Pop1()
pop2()

End Sub

sub Kicker6_Hit()
Kicker6.SolenoidPulse (300)

light2.state=bulbon
light4.state=bulboff

Pop1()
pop2()
End Sub

Sub Kicker7_Hit()
Kicker7.SolenoidPulse (300)

light3.state=bulbon
light1.state=bulboff
pop1()
pop2()
End Sub

Sub Kicker8_Hit()
Kicker8.SolenoidPulse (300)

light4.state=bulbon
light2.state=bulboff
pop1()
pop2()
End Sub


Now it checks if both lights are on each time any of the 4 kickers are hit. If the two correct lights are on, then the solenoid turns on. If one or both of the lights are off, then the solenoid turns off.

I love this stuff.. so much fun when it works!



 


#12 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 28 March 2010 - 04:22 AM

Done for the night! Man... I have scripts running through my brain like mad!

Pretty much finished with all of the main scripting on the table (the confusing stuff). I just have to do the scoring/backglass and game over sequence. Then it will just be a matter of cleaning things up, adding all of the graphics and sounds.




 


#13 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 28 March 2010 - 05:45 AM

I can't stop thinking about this.. lol


Instead of... what I did...

Sub Pop1()
If (light1.State = BulbOn) and (light2.state = BulbOn) Then popup1.solenoidOn

If (light1.State = BulbOff) and (light2.state = BulbOn) Then popup1.solenoidOff

If (light1.State = BulbOn) and (light2.state = BulbOff) Then popup1.solenoidOff

If (light1.State = BulbOff) and (light2.state = BulbOff) Then popup1.solenoidOff
end sub



What if there are a ton of variables? Could it be something more like this?


Sub Pop1()
If (light1.State = BulbOn) and (light2.state = BulbOn) Then popup1.solenoidOn

else popup1.solenoidoff
end sub

??? (too tired to try.. hitting the hay).



 


#14 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 28 March 2010 - 10:16 AM

Im back up.. Couldn't sleep. smile.gif

Greywolf tells me that the instant destroy ball/create ball causing lag on the table in a known bug with FP. He told me to try timers in between the events.

I just did a test though, and saw that the 'createball' is what is causing a lag in the table (I am on a higher end desktop system).

If I cannot get around this bug, then I may have to physically throw my ball back up the table, instead of destroying it and creating a new one. That might be more fun anyways! smile.gif


 


#15 kruge99

kruge99

    Pinball Wizard

  • VPF Staff
  • 3,901 posts
  • Location:Markham, Ont.

  • Flag: Canada

  • Favorite Pinball: Black Knight, High Speed and Pin*Bot



Posted 28 March 2010 - 12:42 PM

Didn't Spy vs. Spy use cannons and cannon balls sometimes? Could you use that somehow for destroying the ball and putting a new one on the table? Or is that more of the same idea that is causing the lag? (am I just covering up the kickers with cannon images and not solving the actual lag problem etc...)


Best Regards,
Todd.
[proud owner of a Williams Solar Fire]

- It's called "The American Dream" because you have to be asleep to believe it.
George Carlin
- Truly great madness cannot be achieved without significant intelligence.
Henrik Tikkanen
- "Reality check, Michelle, Talk about composure, Total lack of. He's a man-- About-- 12 Feet Tall--"
Carrie Kelly
Posted Image

#16 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 28 March 2010 - 04:39 PM

QUOTE (kruge99 @ Mar 28 2010, 06:42 AM) <{POST_SNAPBACK}>
Didn't Spy vs. Spy use cannons and cannon balls sometimes? Could you use that somehow for destroying the ball and putting a new one on the table? Or is that more of the same idea that is causing the lag? (am I just covering up the kickers with cannon images and not solving the actual lag problem etc...)


Best Regards,
Todd.



You must have read my dreams! smile.gif If I cannot fix the lag issue, then I am going to shoot the ball back up the playfield with some sort of cannon.



 


#17 MeatBundle

MeatBundle

    Enthusiast

  • Members
  • PipPipPip
  • 71 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 28 March 2010 - 04:52 PM

QUOTE (Rawd @ Mar 28 2010, 08:45 AM) <{POST_SNAPBACK}>
I can't stop thinking about this.. lol


Instead of... what I did...

Sub Pop1()
If (light1.State = BulbOn) and (light2.state = BulbOn) Then popup1.solenoidOn

If (light1.State = BulbOff) and (light2.state = BulbOn) Then popup1.solenoidOff

If (light1.State = BulbOn) and (light2.state = BulbOff) Then popup1.solenoidOff

If (light1.State = BulbOff) and (light2.state = BulbOff) Then popup1.solenoidOff
end sub



What if there are a ton of variables? Could it be something more like this?


Sub Pop1()
If (light1.State = BulbOn) and (light2.state = BulbOn) Then popup1.solenoidOn

else popup1.solenoidoff
end sub


I don't know if you've gotten this figured out yet, but yes, your second line of code will work fine.

Also, 3 Angels has a neat mechanism for shooting balls throughout the playfield. Can check it out for inspiration.

#18 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 28 March 2010 - 06:11 PM

Well, I guess in most FP tables, the 'createball' doesn't cause much lag, because it usually happens with the ball out of play. On my table, with 2 balls constantly on the table, the lag is noticable.

So I have instead gone with the 'cannon' system. Maybe if I ask nicely, Steve will make me a nice stationary cannon model? smile.gif


All of this stuff will be hidden by the apron. I think it works better than destroy/create, because the ball has a little bit different spin and comes out of the cannon a bit different sometimes. It is also more exciting. smile.gif



I am going to check out how the exploding fire animation was done in 'Metal Slug', when you press the plunger. I want those barrels to explode at the top when they are hit. smile.gif


 


#19 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 28 March 2010 - 08:10 PM

Ok, So I setup two single digit EM reels for the scoreboards for player 1 and 2. Both are working well. (em1 and em2)

How do I tell my script to check for the score state when the player gets a point?


I want to:

If em1 value = 10 then Game over (sequence 1)
if em2 value = 10 then Game over (sequence 2)


Does anyone know the code I need here? Any help is muchly appreciated.


 


#20 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 28 March 2010 - 10:13 PM

Well, I still didn't figure out how to make the Game Over, but I will figure that out later. I added some music and sounds and played a few test games with my wife. She was getting a bit messed up with the flipper buttons (I may swap them). It seemed like this might actually be a fun table to play!

Onto graphics and sounds, and then I will get back to the Game over sequence. Really enjoying working on this!