Bunny hopping with Kinect and Windows Phone with KinectoPhone (aka Bunnyhop)


You'll have to forgive me for referencing one Coding4Fun project in another Coding4Fun area, but this project was just to cool to not include here. It's by Dennis Delimarsky (and Adam Kinney, Rick Barazza) a long time Friend of Channel 9 and shows off using the Kinect for Windows SDK together with a Windows Phone 7 to build a new kind of game...

KinectoPhone – Kinect and Windows Phone working together

A while ago we saw a demo from Microsoft that showed how it is possible to use Windows Phone to interact with a Kinect-powered game. During the Kinect Code Camp, right before the official release of the Kinect for Windows SDK beta, Adam Kinney, Rick Barazza, and I decided to work on a proof-of-concept project that would provide the same platform integration in a non-commercial development environment. Because it involved the main character hopping around collecting bonus items, we called the project Bunnyhop (codename KinectoPhone).

The project was divided into three major components:

The desktop client – a Kinect-controlled 3D environment. It is only partially controlled by the motion sensor, since other responsibilities are delegate to the phone. Because it is a proof-of-concept and not a full-sized game, WPF is the primary sub-framework.

The mobile client – a Windows Phone application that also is in charge of partially controlling the 3D environment on the desktop client. We decided to use Silverlight in favor of XNA because we didn't want complex graphics and all we needed was the bird's eye view of the playable area.

The server – one of the most interesting (and issue-generating) components. This was the link between the desktop and the mobile client. Initially we planned on using a WCF service (and we actually did for a while), but then we decided to use sockets for better performance..

Project Information URL: https://channel9.msdn.com/coding4fun/articles/kinectophone, http://kinectophone.codeplex.com/

Project Source URL: http://kinectophone.codeplex.com/SourceControl/list/changesets




void nui_SkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e)
    SkeletonFrame skeletonFrame = e.SkeletonFrame;

    foreach (SkeletonData data in skeletonFrame.Skeletons)
        if (SkeletonTrackingState.Tracked == data.TrackingState)

            phL = new Point(data.Joints[JointID.HandLeft].Position.X, data.Joints[JointID.HandLeft].Position.Y);
            phR = new Point(data.Joints[JointID.HandRight].Position.X, data.Joints[JointID.HandRight].Position.Y);
            pCore = new Point(data.Joints[JointID.HipCenter].Position.X, data.Joints[JointID.HipCenter].Position.Y);

            coreDeep = data.Joints[JointID.HipCenter].Position.Z;

            leftDeep = data.Joints[JointID.HandLeft].Position.Z - coreDeep;
            rightDeep = data.Joints[JointID.HandRight].Position.Z - coreDeep;

            handL.x = 640 + 600 * phL.X;
            handL.y = 350 - 300 * phL.Y;
            handR.x = 640 + 600 * phR.X;
            handR.y = 350 - 300 * phR.Y;

            bodyCore.x = 640 + 30 * pCore.X;
            bodyCore.y = 350 - 300 * pCore.Y;

            follow.x = bodyCore.x;

Contact Information:

The Discussion

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.