While I take great pride in my work, I am no professional but just a good willing amateur. Therefor I have to warn you that if you decide to use the info on this blog or order some of my "product's", I cannot be held responsible for any kind of damage, burning down your cab/house/city or following addiction to pinball games in any way.

In other words: use is at your own risk !

Monday, November 28, 2011

Other angle of approach

I have read the remark of Noah on VPforums about editing core.vbs and he thinking that is not the way to go. I tend to agree a bit on him and keeping things closer to the table. The table is also 'running' a .vbs script for gameplay. Things also happen there.....

Why do the same kind of things in 2 different places ?

I looked a bit into the B2S magic happening at the moment and got a small insight on how it COULD work.

A am going a bit into details here, so you might want to skip this if you are not interested.

Starting point: a Arduino board connected to the VP PC via usb. On that Arduino port you have special personal dedicated hardware, like i have 28 Mudokons with lighting eyes, but this could also be some gadget like contactors, shakers or whatever. You pick your own config.
Next, from now on, don't think in the LEDwiz way like "i want the middle red flasher to light up for xx microseconds" but think in events like "I want a lightshow with the middle red flasher lighting up and then the 3 middle and then the outer 2" and we give that a name, like "FlashRed1" or something. If you like you can throw in a buzz from the shaker too. That specific lightshow is one of many you can have and personally create. From now on we will call this an event.

Now back to VP. First off we need to open communications with the Arduino board. That is simple, just open a serial port from the table. That's it. Next thing we want is to have VP during gameplay send signals to the Arduino on specific events. This is basicly the thing that the vbs script inside the tables does, it waits for things to change and on specific things it does something.

That something is what we like to know, so we can do our own magic with it. Basicly like with the LEDwiz we are going to say: when switch x is hit, send signal y to the LEDwiz.
Only in this case we want it to watch for switch x and then send a signal to the Arduino. Here comes the point where > I < think is going to be a large speedsaver, the things allready happen, only thing we need to do is just add our own 'listener' to it.
So when a flasher goes off, the vbs sends a signal to the emulated table to show another picture, and we will add that it also sends a event ti the Arduino. The nice thing about Arduino is that we do not need to send a large number of signals to the usb (like LEDwiz) but if we like we could just send 1 byte that refers to the event that is configured in the Arduino.
From that point on the Arduino takes over the hard work, blinking 700 LED's in a order from left to right and so on, and you pinball game just runs further after sending 1 byte of info.

Still with me ? Good.

Some questions:

Is this going to be more work ? Definitly !
Is it going to be faster ? I like to think so at the moment. Love to here comments.
Is it going to need more configuration ? Yes !
Will i be able to have a more realistic cab ? Absolutely
When is it going to be ready ? Not very soon

Oh yeah, and to keep you guys thinking, i have just played around a bit on my desktop with a table and got the basic thing running. While playing BadCats when the ball shoots i get an effect, when drop targets fall also. So it can be done

Very crappy video: