Bob5453 has kindly allowed me to use his Knockout FS table for this "tutorial".
I will try to post screenshots of every step in the process.
Here is the complete tutorial in PDF format (thank you Flying Dutchman)
Building a Second Screen backglass tutorial
The template files needed to create a working backglass can be found here,
B2S Template
So, here we go...
PREPARING THE VP TABLE.
As we no longer need the reels and lights that are normally used on the backdrop, my first step is to move everyting out to the side of the backdrop (not deleting them at this point).

=====================================================================
As this table was done before VP9.1x I am also adding Layback to the view.

=====================================================================
To simplify the work I am saving the table to a new folder. I am also copying the ScreenRes.txt and b2s.vbs from the B2S template. These files must always be located in the same folder as your table.

=====================================================================
OK, now it is time to start editing the script to make it talk to the backglass program.
First of all we need to load the b2s.vbs scriptlet. This should be done at the top of the table scrip.
This is the command to load the b2s file is:
ExecuteGlobal GetTextFile ("b2s.vbs")

=====================================================================
Add the following lines to the beginning of the table_Init routine
ResetB2SData 0, 49, 0
LaunchBackGlass "KnockOut", False
The ResetB2SData instruction is initializing the data area that is used to communicate with the backglass.
LaunchBackGlass is an instruction that automatically loads the backglass. The second argument is set to False for now. False means that the backglass will not be launched.

=====================================================================
The B2S solution requires a timer called B2STimer to work correctly. This timer must be left disabled.

=====================================================================
Now we can go through the script and replace all the emreel and lights with B2SDatas
Lets make the score reels first,
When a new game is started the score is set to zero. You can usually find this code quite easily by searching for the name of the score reel ( or ResetToZero). In the Knockout script it looks like this:

In this screenshot i have already commented the old ResetToZero instructions and replaced them with:
StepB2SData 0, 11, 0, 2, 170, ""
The arguments are: start data, end data, to value, step direction, step interval, step sound
It will reset all player1 and player2 reels to 0 in steps of 170ms without soundfx.
The full syntax is described in the "EM_Backglass_Tutorial.rtf"
At this point it is probably a good idea to start looking at the B2S Data list.
If it was a 4 player game I would have entered:
StepB2SData 0, 23, 0, 2, 170, ""
----------------------------------------------------------------------------------------------------------------------------
0-5 Player 1 Score value 0 - 9
5-11 Player 2 Score value 0 - 9
12-17 Player 3 Score value 0 - 9
18-23 Player 4 Score value 0 - 9
24 Player 1 Rollover value 0 - 1, display Player1 RollOver light
25 Player 2 Rollover value 0 - 1, display Player2 RollOver light
26 Player 3 Rollover value 0 - 1, display Player3 RollOver light
27 Player 4 Rollover value 0 - 1, display Player4 RollOver light
28 Credits
29 PlayerUp value 0 - 4, display the active player light.
30 1To4CanPlay value 0 - 4, display number of players lights.
31 BallInPlay value 0 - 5, display ball in play light.
32 Tilt value 0 -1, display Tilt light.
33 Match value 0 - 10, display Match lights.
34 GameOver value 0 - 1, display GameOver light.
35 Shoot Again value 0 - 1, display Shoot Again light
36-49 Unused value 0 - 254, For table specific needs
=====================================================================
Next we must change the score routine to update the B2SData's instead of the old score reels
In the KnockOut script the score uses separate reels for each score digit. This makes it very easy to mod.

Once again i have commented out the old lines for updating the em-reels and replaced them with my new
SetB2SData instructions.
The script is now sending both player1 and player2 scores to the backglass.
=====================================================================
Next I will update PlayerUp, ballInPlay, Tilt, GameOver ....
Soon to be continued...
Edited by rosve, 18 May 2011 - 08:07 AM.




Top





































are all trademarks of VPFORUMS.