The fixing and solving of problems.

16 Mar

So, in the last couple of days, I have taken a metaphorical sledge hammer to the eye tracking idea. I’ve replaced it under Adam’s suggestion with a kinect. The game now makes use of hand gestures to control the game. You point at things and concentrate to blow it up.

And as everyone who has seen in action has said, its the far better and wiser choice.

This is the third motion control that I have implemented into my game now, and hopefully it’s the last.

The past few days have been hectic, full of very long days and hard work sweat, tears and joy.

I started on Monday, I got out the kinect and tried quickly to get it working with Flash. Adam had already succeeded in this, so, going off of the work produced by, I tried to get the kinect working and controlling flash apps. Monday was not successful, but it was full of learning.

Tuesday was the hardest day. I started by trying more to get the as3kinect stuff working. I had not much luck. It was all down to the fact that there was not much in the way of native controls for mac. Interestingly though, there are some native drivers that work through a standalone app that talks to tuio, the multi-touch open source library. Tuio is what Reactavision uses to track all the various objects on the stage.

Luckily, when I was searching around for as3 and kinect, I stumbled on this youtube video. It handily had the steps on what you needed to do to set this up right in the description.

Tuio is fantastically interesting. It is able to detect multiple blobs or markers, keep track of every single one, determine gestures on them and most importantly, it works with flash.

So, using the tuio kinect app, some bridging software to get the various ports to connect and exchange data and some as3 tuio demos, i had hand tracking with a kinect working in no time.

By the end of the day, I had it all implemented in my game with hit detection and blowing stuff up working.

I’d like to claim that I had written the code for this myself, but unfortunately not. I am standing on the shoulders of giants. The tuio code I worked off of was written by this guy: Silvio Paganini. He quite nicely tracked hands in flash and applied an object to them over the top of them. And then he had the grace to put up his code online for others to look at it and play with.

I needed this code because the tuio api’s arent exactly clear. So, going off of others code, I could begin building my application.

By Wednesday morning, the game could be basically tested by others. It worked well. I got Gary to have a go and as soon as the headset was on correctly, the game worked like a charm. I spent the rest of the day working out all the other bugs in my game that had developed with time and my poor level handling code.

I hate myself for writing such a shitty piece of level handling code. I have no idea why, when the game starts, it starts on level 0, and it only changes this variable up one when the games timer runs out. Fine, except for the fact that you can finish a level early by beating a boss. This bypasses the timer and leaves you stuck on the same level according to the games internal data.

This had somehow been sliding past me as whenever I tested the game, I never could kill the boss or didnt have the headset on. So, I always let the timer run out. Poor I know.

Anyway. It is now the end of Wednesday and I believe I have sorted out this problem and I am awaiting to fix more of the continuous bugs that develop.

The game is getting so close to being finished now. After these bugs are worked out, my time will be spent animating the remaining video and making it look pretty.

I just have to work on handling restarts and level changes this week and everything should be fine.

Apart from the dodgy sound, but that’s for another post. One where I fill with rage and hate.

I’ll have to get a video of this running this week. Have to show off what it’s like when running. It’s very interesting and quite performancey.

While I was playing with this and testing it today, various students and prospective students wandered past D9’s window, stopped and just starred in watching me play with it for a while. It’s a nice feeling. They wouldnt have done that with eye tracking.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: