Kinect Code Camp - We made a Kinect project in 24 hours.
Join the DZone community and get the full member experience.
Join For FreeThe last 48 hours were pretty eventful. The highlight for me was the participation in the Kinect Code Camp - a private Microsoft event where developers were working building fun projects that take advantage of the Kinect motion sensor and the Kinect SDK. I got to work in a great team - made of me, Adam Kinney and Rick Barazza. After an hour of brainstorming, we decided what we're going to work on. With emerging platforms like Windows Phone, it was clear that we wanted to integrate mobile experience with rich experiences provided by Kinect. Thus, the idea of a co-op mini game was born.
Initially, the project was going under the name of Chupacabra (and by the way, that was our team name). Later on, we decided to rename it to Bunny Hop. The idea was as simple as possible - have a game that is partially controlled from the phone and partially via the Kinect sensor. The main challenge was creating the interaction between the phone and the desktop version as seamless as possible. We used a double technology here - both a high-performance WCF service, and sockets, provided by the newest Windows Phone 7.1 SDK.
The problem with WCF is that the exchange through the HTTP pipe (the only way to communicate with a Windows Phone pre-Mango device) is really slow. When it comes to gaming, the cost of a few seconds is really high and even the smallest lag is generally unacceptable. That's why we decided to focus on sockets as well - that played a major role in dropping the performance overhead.
Another tricky issue was handling the accelerometer data on the phone. Ultimately, we wanted to achieve the same user experience as there is in the Super Monkey Ball on the iPhone - as the phone is tilted, the main character advances through the terrain. Due to specific time restraints, we could not spend more time on the precision, but general movement was outlined and working pretty well.
Rick did a great job on designing and managing the 3D environment. Being a professional WPF/SL designer, he put together a maze that had the camera responsive to general Kinect movement. He tracked the user gestures as well as the orientation, so that whenever a jump is detected, the character was moving forward. The data was synced with the phone, that on its side, was handling the rotation of the character. That's where the co-op idea played really well - each component of the game is indispensable.
At the end of the "hackathon", we demo-ed our project on Channel 9 (you can watch the recorded video here). We were also featured on GeekWire, where Todd Bishop interviewed us. Rick talked to Jessica Chobot from IGN (for Attack of the Show), where he talked about the development process and eventually caused our project to change its name (thanks Jessica!).
If you already have a Kinect, here are some resources worth checking out:
Opinions expressed by DZone contributors are their own.
Comments