Saturday, May 8, 2010

Multiplayer Detection

I have been looking into setting up software that allows individual players to be differentiated from each other. This second part of this post is mostly aimed at Daniel, because he has been doing the flash code. It consists of two parts:

Modified Mitt

The mitts will have a timing circuit mounted on them. When the player taps a bubble, the mitt IR LED will be on for a specific amount of time. The time will be different for each mitt, allowing individual mitts to be differentiated. Because the Wiimote IR camera refreshes at 100HZ, one mitt will be on for about 4/100th of a second, while the second will be on for about 15/100th of a second. This allows the software to know which mitt each IR spot is. It may even be possible to add a third or fourth mitt if we test it out the pulse lengths first.

Modified Software

The Wiimote Whiteboard software we were using was set into mouse cursor mode for our original game. This meant that only one bubble could be popped at a time, and that it wasn't possible to differentiate between players. Thus a mouse click will not function properly to pop a bubble with multiple players. The Wiimote software is written in C#, and I have looked at the source code. I can modify the software to track multiple IR spots. The issue is that the flash program will have to have a more complicated interface with the tracking software for it to work. In order for all the game calculations and logic to occur in the flash application, I think the best way for the C# software to talk to the flash program is for the C# software to just pass the player number and pixel location (in X,Y format, likely at 1024 x 768 resolution) of a mitten press to the flash app, with everything else being done in the flash app.

Here are some examples of adding .swf programs into .net framework applications, C# specifically.


  1. Sounds its getting there. Let me know if you need some help.

  2. Ok so I've been trying all this stuff out over the past few days but since a lot of it is passing over my head I've come to the conclusion that I probably wont be able to implement this unless I see an example that is fairly similar to exactly what we are doing.
    I understand how the two programs can talk to each other but not how to get them to do what we want.