Kinect Based Game: Getting started video mysteries

First off start by carefully following Dan Fernandez’s video series on setting up your Kinect

Setting up your Development Environment

Which sounds like you are going to find out how to plug stuff in, etc. but it isn’t.  Of course you will need the Windows Kinect or XBox Kinect and Power Supply.

Once you got everything together, walk through the Installing and Using the Kinect Sensor.  If you have the Kinect on your computer, it is an excellent microphone and camera (at least the windows one that I own).

Once you work through the tutorial you will be able to detect the Kinect Sensor or Sensors since up to 6 can now be connected, although most laptops can’t support that many due to power constraints.

The Mysterious Flyout in the video:

The final app doesn’t do much.  But if you are using Express you might have wondered how Dan got the following (I was unable to capture the full fly out in my system so I am using the one from the Video):

image

If you are using Express you might be asking: What is that fly out thing, where did it come from?  The Flyout is way to view what is happening in the code.  For example: Status shows that the current status is connected.  This feature is available in Professional and Ultimate, and Dan is using one of those.

The Mysterious “+= tab tab” entry

In the video Dan produces the following with a tab-tab

image

When you do a single tab the IDE places the DependencyPropertyChangesEventHandler into the line of code, if you do a tab, tab it creates the event method for you.  Kind of nice.

So what is a DependencyPropertyChangesEventHandler? See a later blog.

Final Mystery:”Try Catch Throw” using “Surrounds with”

Select the lines you want surrounded with and then right click and select Surrounds with

image

And then

image

 

Finally select the Try, it will implement the try, catch, throw

image

Your code will look like:

image

You will need to add the Exception in this case System.IO.IOException

 

Then replace the throw; line with:

 kinectSensorChooser1.AppConflictOccurred();
  
 And that is how you use the “Surround With” to add a Try Catch exception handling.  You can use the surround with for other types of statements that are multi lined. 
  

Conclusion:

To make videos short, the video speaker and demonstrator will skip over some of these kinds of things.  You may not have the exact same technology, etc.