Jump to content



Photo

90's Workshop: Buildin' The Table


  • Please log in to reply
369 replies to this topic

#361 kruge99

kruge99

    Pinball Wizard

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

  • Flag: Canada

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



Posted 29 October 2010 - 10:43 AM

QUOTE (wtiger @ Oct 28 2010, 11:14 PM) <{POST_SNAPBACK}>
I hope to have some time tomorrow to continue on this.


Looking forward to this! Any reason you chose to do the table lights with drop walls instead of lights? It's recently been discovered that a significant performance increase can be achieved by using lights (FadeL / FadeGL etc) instead of dropwalls in the fading light system by PacDude and subsequently modifed by the likes of JPSalas and Unclewilly. I believe Unclewilly switched one of his tables (Theatre of Magic maybe?) from using dropwalls to multiple lights and the "ball stutter" all but vanished. Anyways, I hope it's not too late to switch it if necessary or perhaps combine both methods as part of the tutorial?


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

#362 unclewilly

unclewilly

    sofa king.....

  • VIP
  • 5,170 posts
  • Location:Baltimore, Maryland

  • Flag: United States of America

  • Favorite Pinball: tz, tom, big hurt, who dunnit



Posted 29 October 2010 - 12:42 PM

This tutorial is sweet wtiger. I'm doing one myself but for comet. You've done a great job with this. I never realized how hard writing one of these is to write until I started writing one myself.
I just want to say how much I appreciate this.
We can only hope this inspires more people to get involved building tables.

"it will all be ok in the end, if it's not ok, it's not the end"
 
Monster Bash VP10 WIP https://dl.dropboxus... (vpx)WIP15.vpx

uw2.gif


#363 wtiger

wtiger

    Pinball Fan

  • VIP
  • 1,148 posts
  • Location:Los Angeles, CA

  • Flag: United States of America

  • Favorite Pinball: Junkyard



Contributor

Posted 29 October 2010 - 06:37 PM

QUOTE (kruge99 @ Oct 29 2010, 03:43 AM) <{POST_SNAPBACK}>
Any reason you chose to do the table lights with drop walls instead of lights? It's recently been discovered that a significant performance increase can be achieved by using lights (FadeL / FadeGL etc) instead of dropwalls in the fading light system by PacDude and subsequently modifed by the likes of JPSalas and Unclewilly. I believe Unclewilly switched one of his tables (Theatre of Magic maybe?) from using dropwalls to multiple lights and the "ball stutter" all but vanished. Anyways, I hope it's not too late to switch it if necessary or perhaps combine both methods as part of the tutorial?


Todd, I only went with drop walls since that is what I know and have done before. You bring up a good point though so I'll look into the method of using just lights and hopefully post some on that. It's never too late for anything (in fact, I haven't even had the time to finish up all the rest of the lights on my own table).


QUOTE (unclewilly @ Oct 29 2010, 05:42 AM) <{POST_SNAPBACK}>
This tutorial is sweet wtiger. I'm doing one myself but for comet. You've done a great job with this. I never realized how hard writing one of these is to write until I started writing one myself.
I just want to say how much I appreciate this.
We can only hope this inspires more people to get involved building tables.


Thanks. I appreciate that! Yeah, it does take quite a bit of time to put these together and lately I just haven't have too much of it.


#364 wtiger

wtiger

    Pinball Fan

  • VIP
  • 1,148 posts
  • Location:Los Angeles, CA

  • Flag: United States of America

  • Favorite Pinball: Junkyard



Contributor

Posted 30 October 2010 - 02:26 AM

We will now add the routine for the ball release. Make sure you have the manual handy as we will be referring to it quite a bit.

Taking a look at the coil location page of the manual you will see that for the ball release coil number 1 is used to kick the ball into the shooter lane and coil number 2 is the coil that launches the ball down the shooter lane and into play.




Also refer to the Coils Detailed Chart Table




There are also several switches that are involved:







Switch 11, 12, 13, and 14 are used as part of the ball stack when balls are loaded in the trough waiting to be released. The switches would be on when a ball is sitting on them. Switch 15 is an opto switch that gets triggered when a ball is kicked out of the trough and passes by on its way to the shooter lane. After a ball is released to the shooter lane it will sit on switch 16 (activating it) until it is released down the shooter lane and into play. One other thing of note is that this particular pinball game had a launch button rather than a traditional pull back plunger.




Now in order to make all this work, we need to first add some things to our table. We need to “cut out” a place for our balls to be kicked out of so they can enter the shooter lane.

Your table should currently look something like this:




What we want to do is delete the plunger object and change the wall below the apron so that there is a cut out area to house the ball and where it can be released from:




Click on your Apron wall object and translate it -200 in the X Offset to move it out of the way:




Now select the object that was right below the Apron




Now refer to the image below and right click and add a point four times:




Now move them to shape a cut out area. Also add a kicker object and name it BallRelease. Make sure that none of the wall edges are touching the kicker:




Now add a gate object and change the rotation from -90 to 90:




Adjust the wall openings so that they match up with the ends of the gate object:




Now move the apron wall object back into place (translate it 200 in the X Offset). Add a trigger object in the shooter lane and call it sw16:



That’s all I have time for now. We will continue on next time.


#365 wtiger

wtiger

    Pinball Fan

  • VIP
  • 1,148 posts
  • Location:Los Angeles, CA

  • Flag: United States of America

  • Favorite Pinball: Junkyard



Contributor

Posted 07 November 2010 - 02:00 AM

A couple days ago I worked on the ball release and plunger but the way I did it isn't 100% correct (the routine I used has a regular pull back plunger rather than just a launch button). Today I tried to do it the way it should be by looking at a similar table as well as Nealtron's table and adapt it into my table but so far I can't get it to work properly. Anyway, I will try experimenting some more tomorrow (if I have the time) and hopefully get it working properly. Worst case I may just post what I did a couple days ago as it does work.

#366 wtiger

wtiger

    Pinball Fan

  • VIP
  • 1,148 posts
  • Location:Los Angeles, CA

  • Flag: United States of America

  • Favorite Pinball: Junkyard



Contributor

Posted 13 November 2010 - 12:10 AM

A couple more switches from the manual (see the Switch Matrix Grid) are switch 53 which is the launch button and switch 54 which is the start button.

I tried and tried to get configure the table to work like the real machine with the launch button to put the ball into play (you simply hit the button and immediately the ball launches down the shooter lane rather than having a pull back plunger) but for some reason I just couldn’t get it to work right yet. Rather than trying to figure it out now in the time I have (which will probably end up taking me a couple weeks more) I thought I’d just go ahead and post the instructions for a regular pull back and release plunger. If at a later time I figure it out (or if anyone wants to post how to fix it) we can change over to the proper ball launch then.

So, before we start adding to the script we need to add a couple plunger objects to our table. One is the one we control and the other is the computer controlled autoplunger.

Start by adding a plunger object to our table:




Make sure it is called Plunger (without any numbers after it). Change the Release speed to 160. This plunger is the one we control. Now make a copy of it (CTRL-C) and then paste a duplicate on top of it (CTRL-V). Make sure this copy is called Plunger1.

Now go into the script. At around line 34 (right after the End Sub line of the LoadVPM routine) add the following code:

CODE
SolCallBack(1) = "SolTrough"
SolCallBack(2) = "vpmSolAutoPlunger Plunger1,0,"

Sub SolTrough(Enabled)
    If Enabled Then
        bsTrough.ExitSol_On
        vpmTimer.PulseSw 15
    End If
End Sub

Dim bsTrough



Your script window should look like this:




Here’s a brief description of what this code does.

SolCallBack(1) = "SolTrough"
This tells VPM that when solenoid 1 is activated we will run our subroutine called SolTrough. If you refer to the Coils Detaled Chart from the manual you will see that coil number 1 is our trough up-kicker which is the coil/solenoid that kicks the ball into the shooter lane.

SolCallBack(2) = "vpmSolAutoPlunger Plunger1,0,"
This next line tells VPM that solenoid 2 is an autoplunger and the plunger object on our table is called Plunger1. When solenoid 2 is fired VPM will automatically pull back the Plunger1 object and release it which in turn automatically launches the ball.

The next 6 lines of scrip are the SolTrough subroutine that is ran when solenoid 1 is activated. When this subroutine is ran it will also pulse switch 15 which is the 4-ball trough VUK opto (refer to the Switch Matrix Grid from the manual). VPM will pulse this switch just as if a ball was passing though the opto on the real table.

The last line of code, Dim bsTrough is used to declare a variable name (Dim is short for Dimension which means that the computer will dimension memory for our variable). In this case it is bsTrough which stands for a ball stack trough. Anytime you use a variable in the script you must include it in a Dim statement or you will get errors in your script. The next bit of code that we will add will use this variable.


Now add the following code around line 75 (right after the Table1 Init routine and just before the Const PD_LightSystemVersion = 5.5 line.


CODE
Set bsTrough=New cvpmBallStack
   bsTrough.InitSw 0,14,13,12,11,0,0,0
   bsTrough.InitKick BallRelease,80,6
   bsTrough.InitExitSnd "BallRel","Solon"
   bsTrough.Balls=4

Sub Table1_KeyDown(ByVal KeyCode)
      If KeyCode=PlungerKey Then Plunger.Pullback
      If KeyDownHandler(KeyCode) Then Exit Sub
End Sub

Sub Table1_KeyUp(ByVal KeyCode)
      If KeyCode=PlungerKey Then Plunger.Fire
      If KeyUpHandler(KeyCode) Then Exit Sub
End Sub

Sub Drain_Hit:bsTrough.AddBall Me:End Sub

Sub sw16_Hit:Controller.Switch(16)=1:End Sub
Sub sw16_unHit:Controller.Switch(16)=0:End Sub



Your script window should look like this:




Here’s a brief description of what this code that we added does.

The first 5 lines set up our ball stack with switches 14, 13, 12, and 11. The exit kicker is our object called BallRelease and it will kick the ball at an angle of 80 degrees (not sure why I used 80 rather than 90 which would be straight to the right I don’t know) and a force of 6. When the ball is kicked out it will play the sound named BallRel. You would have to import the sound you want (or in this case BallRel.wav) through the Table, Sound Manager menu. The last line tells VPM that our ball stack contains 4 balls total (did you notice prior to adding today’s script info that if you play the table the DMD keeps saying “4 balls missing”). It won’t anymore after this!

The next four lines of code are for our subroutine when a key on the keyboard is pushed down. We have it set up that when the plunger key (the “Enter”) is held down our object called Plunger is pulled back.

You can probably guess what the next four lines of code are. Yup, once a key is held down and then it is let up this subroutine is run. We’ve told VPM that after the plunger key is let go to fire the object called Plunger and thus shoot the ball down the shooter lane.

The next line of code, Sub Drain_Hit:bsTrough.AddBall Me:End Sub, tells VPM that when the Drain object on our table is hit to add a ball to the ball stack called bsTrough.

The last two lines of code are for switch 16 which is in the shooter lane right above the plunger. The first of these two lines tells VPM that if our sw16 trigger object is hit (ie a ball is sitting on it) then switch 16 is enabled. If our sw16 trigger object does not have a ball on it (or hitting it) then switch 16 is disabled. All of this is to know whether a ball is sitting in the shooter lane waiting to be launched or not.

Now that we have added all of this to our script, if you go and “play” the table now, you will be able to add coins/credits to the game, start a new game, have a ball kicked into the shooter lane and be able to launch it.

If anyone has anything (better explanation of the script) or any corrections, please feel free to post.

Edited by wtiger, 13 November 2010 - 01:48 AM.


#367 destruk

destruk

    VPF Veteran

  • VPF Staff
  • 6,338 posts
  • Location:Colorado Springs, CO

  • Flag: United States of America

  • Favorite Pinball: Ultrapin!



Posted 13 November 2010 - 01:14 AM

This should work to get the actual autoplunger solenoid working like the real thing.

remove your sw16 hit and unhit code
remove the sw16 trigger
remove the plunger object
remove the other plunger key lines from the keyup and keydown section



Set bsShooter=New cvpmBallStack
bsShooter.InitSaucer BallShooter,16,0,25
bsShooter.InitExitSnd "Plunger","SolOn"
bsShooter.KickForceVar=5

name the kicker ballshooter, change it to Kicker type INVISIBLE and make sure it's enabled
Sub BallShooter_Hit:bsShooter.AddBall 0:End Sub

Keydown routine --
If KeyCode=PlungerKey Then vpmTimer.PulseSw 53

Dim bsShooter 'global define outside of any subroutines - near the Dim bsTrough is a good place
Change SolCallback(2) that you have now, to this:
SolCallBack(2) = "bsShooter.SolOut"


btw 90 degrees in vp is straight to the right. I'm sure that's what you meant to say.

Edited by destruk, 13 November 2010 - 01:19 AM.

Build a fire, vipers love the heat.


#368 wtiger

wtiger

    Pinball Fan

  • VIP
  • 1,148 posts
  • Location:Los Angeles, CA

  • Flag: United States of America

  • Favorite Pinball: Junkyard



Contributor

Posted 13 November 2010 - 01:50 AM

As always, thanks Destruk! I'll inplement into my table the script changes over the weekend. Also, thanks for correcting my 90 degrees = to the right (I just corrected it in my post).

#369 wtiger

wtiger

    Pinball Fan

  • VIP
  • 1,148 posts
  • Location:Los Angeles, CA

  • Flag: United States of America

  • Favorite Pinball: Junkyard



Contributor

Posted 13 November 2010 - 05:52 PM

I just made the changes posted by Destruk and I'm getting the same results that I was getting last weekend when I couldn't get it to work right. As soon as the ball is kicked into the shooter lane at the start of the game it automatically launches without even hitting the launch button (Enter key).

#370 wtiger

wtiger

    Pinball Fan

  • VIP
  • 1,148 posts
  • Location:Los Angeles, CA

  • Flag: United States of America

  • Favorite Pinball: Junkyard



Contributor

Posted 14 November 2010 - 01:46 AM

Well, I just spent the last couple hours trying all kinds of different things and no luck. I even tried duplicating the script from Nealtron's table and how the ball won't even kick into the shooter lane. I am quitting for the evening. Hopefully tomorrow I'll have some time and we will switch our lights from drop walls to light objects.