This site requires JavaScript, please enable it in your browser!
Greenfoot back

Greenfoot and Kinect - Sharing a Kinect

You may find yourself with more people wanting to use a Kinect than you have Kinect sensors. This may be an after-school club with ten students and one Kinect, or it may be two university students sharing an office. It is generally the case that you spend ten minutes coding and then one minute testing with the Kinect, so there is opportunity to share, but plugging and unplugging the Kinect from one machine to another is quite tiresome.

The Kinect server actually allows machines to connect across the network (providing your machine access rights, firewall and network policy allow this -- school and university networks tend to be quite locked down).

Here's how to do it:

  • On the machine that has the Kinect, run the kinectserver with the "-n" option.

    You can do this on Windows by making a shortcut to the server program, then modifying it to add -n at the end after the program name.

  • Then run the kinectserver as usual on that machine, and you'll be able to connect it to normally.

  • All other users wanting to connect to you need to find this line in their world class:

       kinect = new KinectClient(THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT);


    and change it to

       kinect = new KinectClient(THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT, "1.2.3.4");

    replacing 1.2.3.4 with the local network IP address (or hostname) of the machine running the kinectserver. You can find this out using the ipconfig command on Windows (don't use internet sites like whatismyip, as that will be the IP of your internet gateway, not your local network IP).

Back to general Greenfoot/Kinect instructions