Wednesday, December 24, 2008

AudiOdyssey: First accessible game using Wii Remote

Today I shall introduce the game that I worked on in my gambit internship last summer.

AudiOdyssey, the first game which uses a Wii Remote made for both the visually handicapped (including the colour-blind and the blind) and the sighted .  In the game, you play as a DJ, attempting to synchronize different rhythms to build up your song on the dance floor via a beat-matching mechanic.  That is, you have to swing the Wii Remote at the right time to get the song beats going.  This game was done as part of the Singapore-MIT Gambit Games Lab summer internship held over the 2 months of mid June to mid August, at Massachusetts Institute of Technology (MIT) in Boston, in a team of 8 consisting of 5 Singaporean students and 3 MIT students.

I think I will share more about Wii Remote since that's probably not something you would mess with everyday.  We connected the Wii Remote via bluetooth to the PC to be able to use it to play the game.  And then we started to try to figure out how to make it do what. For starters, the Wii Remote has a 3-axis accelerometer and an infrared detector.  The accelerometer can measure how much the device is moving in any direction in a 3D space while the infrared detector will pick up _any_ infrared emitting signal and try to decipher that.  As an interesting experiment, you can point the Wii Remote at the sun and you may still be able control your cursor in the Wii Home screen. You may also try that with 2 candles placed slightly apart.  For this same reason, Johnny Lee is now famous because he built a simple head tracking application and managed to wow the world with it (yes, it is an extremely simple application that any SOC student can do in a week).

With regards to the accelerometer, it records acceleration in values in scales of g. I have a flash debugging tool that can draw the graph of the motion input but Mac users get it for free with DarwinRemote so I'll just show that instead:

The graph is drawn in realtime while you move the Wii Remote.  That means that horizontal axis is time and the vertical axis is the value in the scale of g.  As you can see it the later half of the graph, the wiimote is held stationary but there is still a force acting on it. This is gravity and the g value is 1.  At the start of the graph you can distinctively see there are 3 coloured lines. Each colour represents one of the 3 axes. 

An interesting experiment I did was about how hard a person could  swing a Wii Remote.  It turned out that the maximum I ever reached was about 5g... That's as much acceleration as some of the fastest rollercoaster rides can get (I personally sat the Superman ride which was awesome btw).  If anyone can break 6g with swinging the Wii Remote, please post in the comments below

Now some quirks about the Wii Remote you probably did not know about.  If you swing the Wii Remote really hard and then bring it to a stop very quickly, you will notice that the accelerometers are spring based and they continue to oscillate giving rise to a common damping graph even after you hold the Wii Remote steady.  For this reason and the influence of gravity, programming the Wii Remote motion detection is extremely hard due to the large inaccuracies of the acceleration values.  For example, it is near impossible to detect an S-shaped motion. What makes it worse is that we found that different people use the Wii Remote differently from others.  One person's swing graph could be vastly different from another person's graph depending on the force they use, whether they tilt it slightly or whether they move their wrist instead of elbow.  All these factors basically add up and probably can explain why you may get frustrated with some Wii games due to the controls: It probably worked fine during testing because they got used to it.  As far as I know, the easiest way to detect a swing is of detection by a threshold value.  Several other methods we have tried include storing the history values, average values, etc.  If you have any good ideas on other possible accelerometer-based motion detection techniques, please post in the comments below!

If you're interested more about how to get a Wii Remote hooked up to a computer. Check out these websites:

No comments: