I attended the Game Developers Conference (GDC)back in 2008 and saw this vest and fell in love with it. It has the ability to let you “Feel” when you get shot or fragged in a game. I quickly noticed how you change the way you play when you wear it because you know the “pain” is coming when you get shot. Ok not really pain, but an air pocket inflates where you are shot. I was even more lucky when my wife decided to get me one for my birthday that year. I played it with many different game but of course in the Waterhobo fashion I wanted more.
I had hoped to have the vest connected and usable with the WiFi Warthogs at the PDC, but it was not meant to be. There is a SDK, but it is a C++ unmanaged code. On top of that it did not have any dlls but only the header and library file. Of course I am not a C++ person, my C skills are dated and I could not really get any help from TN Games or for that matter the internet. So it meant C++ here I come, so if you know C++ and see something that could be better please comment on a better way. I can say that what I put together did work.
First I needed to turn the C++ unmanaged code into a dll that could be imported into a C# managed dll. I happened to find a code snipped that kind of met my needs, not perfect, but it did put me on the right path. Below is the code that allowed me to make the unmanaged dll that I would need in order make the managed one. I got it to work fine, but I am not the most qualified to explain it. The parts to note are the linking of the tngaming.lib and the header file that explain the sdk from TN Games.
Now with the unmanaged code library built it is a simple matter of importing it into a C# wrapper. Then another simple process of creating a test harness to call our new dll and test all of the functionality.
A few notes on the dll building process, I put everything together as best as I could based my limited C++ knowledge and the included SDK documentation. The test harness works fine, but a few things I did notice. It is possible I did something wrong with the C++; so if you know C++ please let me know, but it seems as if the TN Games sdk does not match the documentation. The return codes did not come back as stated, enum did not work as stated, you do not get error statuses if you do not set the vest up first as stated in the documentation. Again I do not know if it is me, the documentation, the TN Games lib file or a combination of all that I did not get everything to match the documentation; so this is my only disclaimer. So on with the show…
In the code below I am importing the unmanaged code into my C# dll, I am also defining all the functions that will be called. They are a match to the C++ dll functions, so this is just a pass through from C# to C++.
Now that we have the dll made it is a simple process of importing the dll into our project and building a test harness.
This is a screen shot of our test harness.
At this point you can test the functionality of the vest. you will first plug the vest into the USB port and have everything setup like you would if you were playing a game. You are ready to now just step through each of the steps. First initialize the vest, you do this via the setup vest button. Next if you read the documentation from TN Games that comes with their SDK you will be able to select the different effects to see exactly what each means (machine gun, grenade, etc.). You will also be able to test each of the bellows to simulate being shot in different areas.
In summary, I really wished I was able to have gotten this ready for the PDC, I think it would have added a cool twist to the Wi-Fi Warthogs. So what is next? ARE YOU KIDDING… now that we have a C# dll the sky is the limited. How about getting shot from a web page? Or How about every time you get an email you also get a grenade effect. Maybe put a service in the cloud that allows me to play a SilverLight MMO game and when someone shoots me or hits me I know it. Of course XNA with XBox live would be fun, but TN Games appears to have beat me there, oh well there is SilverLight/XNA for Windows Phone 7, Bluetooth to pc and a service to the vest, yes that might work…
This is the source code that I made. I do ask if you decide to use this that you at least give me credit for figuring out this much. TN Games now if you are looking for a tester or someone to maybe take this in another direction drop me a line at firstname.lastname@example.org i would love to play some more…