Have you ever wanted to make your own Kinect game?
Or maybe you have not yet heard of Microsoft's versatile depth camera?
Thankfully, you have come to the right place. We will be going step by step through the creation of a computer-controlled 2 player Kinect game.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Project Parts
You need the following components for this project. I added links to amazon if you need to purchase these parts. Look elsewhere on the Internet if you want a cheaper or if you want to order from a different site
1. Xbox 360 Kinect Sensor (click here for GameStop link)
2. Kinect Adapter (here is the Amazon link)
3. Processing IDE (download at the Processing website) (I recommend using an older version of Processing (such as 2.2.1) since the 3.1.1 version did not work with this version of the OpenNI library)
4. A few libraries and tools (I'll provide download links later on)
With all of these parts, you can begin this projects.
(The picture shows the Kinect, the adapter, and a laptop with all the necessary software installed)
Step 2: Download Simple OpenNi
Simple OpenNi is a piece of software that allows us to use the Kinect with a laptop instead of the Xbox console.
Here are precise instructions on how to download the software. The instructions cover installation for Windows, Mac OSX, and Linux systems
Step 3: Download Processing Library
Now that you have the software to control the Kinect with your computer, you have to download the library to control the Kinect with Processing.
1. Here is the library. Choose the SimpleOpenNI-1.96.zip file.
2. Then unzip the file, and move the contents to Processing's Libraries folder. This should be in:
Documents -> Processing -> Libraries
The Libraries folder may be in a different directory based on your operating system. If you cannot find the folder, go to Processing's Preferences tab to see its location.
3. Also make sure that you have the Minim library installed (again, unzip the file and copy the contents to the Library folder)
4. Now Restart Processing. SimpleOpenNI should appear as one of the options under
Sketch -> Import Library
Step 4: Quick Test
In order to make sure that everything is working properly, and to rule out future errors, we will perform a quick test for the Kinect camera.
Open kinect_depth_Image.ino with Processing, and click on run. The program should show a window with one side as the Kinect's depth camera, and the with the Kinect's color camera. It should look like something in the picture.
If the program is not working, check to see if the Kinect is well connected to your computer, and that the SimpleOpenNI library is in the right folder. If everything is connected, and the library is in place, add a comment, and I'll get back to you as soon as possible.
Step 5: The Real Deal
Now that you have checked that the Kinect's depth camera is working, it is time to upload the game.
Open the main sketch here on Github with Processing, and run the sketch.
Make sure the Kinect is well oriented, so that it can capture the majority of your upper body.
Once the depth camera registers your shape, a red dot should appear on your head, and a set of crosshairs should appear in the top right corner of the screen
Step 6: Have Fun!
Now grab a friend, and tell him to try to click your head on the computer as you move around to make the game harder for him.
Also, if the game is too easy, feel free to modify the code to fit your skill level.
(Make sure you check out the video to see how the game is played)