Monthly Archive for July, 2011

Linking Microsoft Kinect SDK to Adobe AIR & TUIO Multitouch

Finally had a chance to play around with the official Kinect SDK. First thing I wanted to try, was to link the Kinect SDK to Adobe AIR (with UDP), and adjust my previous kinect demos (with OSCeleton and the open source drivers) so I could do multitouch with the kinect (a bit like minority report). The official SDK is a lot more stable then the open source drivers, and another plus is you don’t need to stand in a calibration position for the skeleton to get tracked. Downside of the official SDK is that it’s windows only…

So, I booted up my Windows pc, and threw together a UDP bridge in C#, which sends the skeleton information as a JSON encoded string to a target IP + port. I’ve coded a little adapter in Actionscript 3, which translates the JSON object into TUIO cursors. After that, it was a piece of cake to get multitouch working in Adobe AIR, using the skeleton information from the kinect.

Using your hands as multitouch cursors

I’m happy to share the C# project for the Kinect UDP bridge, and an AIR sample project, which allows you to transform a square, using the touch events from the kinect. Have fun!

Update: I’ve also uploaded a binary, run setup.exe in the zip file to install. Make sure the kinect is connected when you start up the application.

Source code for airserver space game

Sorry for neglecting this follow-up post, but here it is: the source code for the airserver space game from my previous post.

The zip file is actually a Flash Builder 4.5 workspace, containing the following projects:

- AIRServer: the library project containing the AIRServer classes
- CocoonP2P: the cocoon P2P library
- DevineSpaceGameAIRServer: the AIR server, containing the space game
- DevineSpaceGameControllerAMF: A mobile controller, using an AMF socket connection
- DevineSpaceGameControllerP2P: A mobile controller, using CocoonP2P

When the game is running, you can control it through websockets aswel: surf to http://labs.aboutme.be/airserver/spaceshooter/ with an iPhone4 / iPod Touch 2 or iPad to control the game.

Enjoy!