The post and instructions below has been deprecated in favour of a much simpler setup.
The new setup uses Windows 7 and the MS Kinect SDK and my free program Kinect2Scratch available on http//scratch.saorog.com
I'd love for you to try it out and give me some feedback!
Thought some of you might be interested in my page on how to use your Kinect with Scratch: http://stephen-howell.tumblr.com
The Kinect is a great add-on for the XBox 360. Many people had their doubts, and although core gamers will decry the Kinect, it can be really good fun to play around with. Literally, you are the controller. There has been some interest in hacking the Kinect to work with computers other than the XBox, and there are drivers available now to use with Windows, MacOSX and Linux.
I became interested in coding Processing to work with the Kinect, but soon became disheartened when it appeared that bone data (or joint positions) were not readily available, instead only 3D depth data (cool but not enough) was readable.
Then I found the OpenNI drivers (see links below) and the OSC server from Sensebloom. They were able to send joint data encoded as OSC commands to Processing, and I wrote up my own little Processing receiver to test it. It worked so well, I delved into their C++ code to see if I could send the same data to Scratch.
When I couldn’t see a way for Scratch to interpret the OSC code, I read about the remote sensing over the network that Scratch allows. This was perfect; I could send Scratch commands from a C program which was reading joint data from the Kinect.
So after making a few Scratch proof-of-concept games to test it, I decided to release it all for you guys to test out.
You will need:
A standalone Kinect (one bought without a console) OR a Kinect that came in a console bundle and the separately available USB plug to connect it to your PC
A Windows PC (other versions can be made by coders familiar with coding on OSX or Linux)
The OpenNI.org drivers installed
The OpenNI2Scratch program
Some Kinect aware Scratch programs. Here are a few: Skeleton, Ball Bounce and Space Invaders
(Links to all of these are available on the tumblr page mentioned above)
Once you’ve set that up, you have to connect the Kinect to your PC and wait for the drivers to install. Then run the OpenNI2Scratch program. Run Scratch, execute the Scratch program you want to control. Calibrate the Kinect - this involves standing a fair bit back from it and standing in a ‘calibration pose’ for a few seconds - see picture on site. Once the program has detected you, it will send the joint positions to Scratch. After that, see the variables on the sample Scratch programs to see how to use the joint data.