Monday 27 October 2008

How the axes work on the Wii Remote

If you move the Wii Remote along each of these axes then the values from the accelerometer along each axis will vary.

So moving the remote rapidly from side to side will cause change in the 'x' axis.

The sensitivity of the accelerometer in the remote (and indeed the Wii Nunchuck - they're the same spec) generally means that it's very difficult move along one axis at a time.

Now it's time to work out how to get this information recorded in Director!

Sunday 26 October 2008

Squeezii Schmiizii Diizii "Wiigee"

Ohhhhh, yes, the titles can and shall get worse than that...

In my quest for all things interactive and Wii, I stumbled apon this rather nice gesture-recognition library based in Java called Wiigee. It's being developed by several German university students and from the demo video it looks amazing.

I compiled all the code using Eclipse but, unfortunately, my Bluetooth stack ('Blue Soleil') and Bluetooth dongle aren't compatible with the requirements of the Java Bluetooth library, 'Bluecove' which requires 'L2CAP'.

To save the waffle, check out the following video on the Wiigee site:

http://www.wiigee.org/demovideo/demovideo.html

Links

Wiigee site: http://www.wiigee.org/index.html
L2CAP definition: http://en.wikipedia.org/wiki/Bluetooth_protocols#L2CAP_.28Logical_Link_Control_and_Adaptation_Protocol.29
Bluecove site: http://code.google.com/p/bluecove/
Eclipse site: http://www.eclipse.org/
Blue Soleil site: http://www.bluesoleil.com/

Thursday 23 October 2008

Using the Wii Remote with Director

Proof Of Concept time folks!

Using an example from my module for 3D graphics using Director and the example code for the Wii Remote Director Xtra, I've managed to demonstrate how it is indeed possible for the Wii Remote to change variables in Macromedia Director MX (note: the Xtra only seems to work for MX, those with the new Adobe Director probably won't get anything working, tough :P).

Obviously, this isn't exactly the first time anyone's done this before (yeh, obviously!) but this stage of my research moreorless defines the direction in which my project is likely to take - for the programming portion of it at least.

The screenshot below shows what I came up with... It's the quickest and dirtiest method, but I just needed to see for myself that it's possible to manipulate 3D graphics, albeit on a basic level, using the Wii Remote.

I set the program up to make the cube rotate about the x-axis and the sphere rotate about the y-axis. In terms of the Wii Remote this means that pointing it up or down will make the cube move and tilting it from side to side will make the sphere spin from side to side.

The program is very responsive with no delay between making the movement with the remote and seeing the result of the movement reflected on the screen.

When I placed the remote on a flat surface and flicked it to make it rock, even these small rocking movements were registered. All in all, this test was a complete success! The next test will be to import a terrain/model from 3dsMAX that's slightly more complicated, just to see if the smoothness of this test can be maintained.

One thing to note for all this - this is just taking the numbers from the Wii Remote Xtra and using them without performing any calculations. I also didn't have much regard for HOW the 3D models were moved/rotated, I just used the first method that came to hand, therefore the test doesn't respond as expected sometimes...!

The next task will be to have the 3D models moving in exact relation to the way the Wii remote is pitched or rolled. i.e. the changes aren't relative, they should be absolute! Another task will be to officially begin my research into specialised user-interfaces and methods of control. This will all hark back to my original ideas that involved the use of webcams - who knows, this method of control may crop up again in my project!

Wii & Director MX

Well, the software I'm using to make my project has changed since the hazy summer days when Flash seemed like the ideal option.

There are a few reasons for this!

One - Director MX has an Xtra that you can download for free that enables seamless integration between the Wii Remote and Director using very little Lingo code to get the data into the software...

Two - It's possible to import 3D models from 3dsMAX and then traverse them in Director - again with relatively little effort compared to using a 3D-engine with Flash (like Papervision 3D)

Three - The method of getting the data into Flash, using WiiFlashServer, required the use of AS3, some of which is radically different to AS2 and I personally do not have the time to update my knowledge of AS. As I have to learn Director's Lingo language for another module, it's easier really!

Next up is the proof-of-concept!

cheers...

Individual Project Proposal - Wiiiiiiii

Oh, it's been a while again...

Here's my project proposal - it's not the greatest prose in the history of English but it sort of does the job!

My project will centre around researching intuitive methods of interacting with a computer – be it a workstation, laptop or another bespoke computer system such as a games console or installation-art.

The first element of my project will be made up of research into the existing intuitive control methods or user interfaces that are available on the market today, and several from the past. Many user interfaces or methods of control aren't intuitive or natural and may require training to use. I shall be finding out why these methods of control have been successful, or not.

The bulk of the research will involve finding methods of interacting with the computer system that feel more 'human' or natural.

Over the course of the overall research into user interfaces, I shall also be investigating the many possibilities there are for capturing motion information onto a computer and then using it in a meaningful way. For example, the Nintendo Wii remote controller can be linked to a computer via Bluetooth and used with a variety of programming environments ranging from Flash, Director all the way through to many open-source developments.

The second part of the project will involve using the research to produce an application based in a 3D environment.

The control device that I will be using is the Nintendo Wii remote. This is due to the fact that it has a whole array of sensors (accelerometers) that send a continuous stream of information to be interpreted by the computer.

The aim is to give the user the ability to traverse the 3D environment without using any button presses, but rather using a series of different movements or gestures – the latter being much more natural. There have been many inventive uses for the sensors in the Wii remote, which is apparent from looking at the choice of games that are available for the Wii. Another of my aims when creating this application is to create a series of gestures that need to be carried out to move through the world (such as waving the remote in a circular motion or moving it very quickly, miming the swinging motion of a baseball bat). There may also be a game-playing element to this application.


That's it but it will be revised shortly...!

Saturday 16 August 2008

Project Idea #1

It's been a while again, but here's a semi-decent idea for a project! So, point by point below...

1. 'Rez in Flash'
2. ...but in a faux-3D world.
3. The player flies into the screen.
4. Exclusively uses a Nintendo Wii Remote as a means of control.
5. Move the player left and right by altering the 'roll' of the Wii Remote.
6. Aim using the Wii Remote functioning in the same way as a mouse.
7. Use of gestures - Tracing different shapes using the Wii Remote to unlock areas and proceed through the game.

That's all folks - hope it's easy to make!


MA

Wednesday 23 July 2008

Another Dose Of Wii - asblabs.wiimote

(yeh, the awful puns continue...)

Found an incredibly useful set of classes from here:

http://www.asb-labs.com/blog/flash-gaming-classes-wiimote-wiiflash/

Amongst other fun things you can:

1. Point the Wii Remote at the screen and use it to move a cursor object around the stage.
2. Control individual LEDs on the Wii Remote - a bit pointless, but very very fun I suppose.
3. Register if a certain combination of buttons has been pressed. Intended for use in game programming, however, there are a dozens of other uses for this ablity apart from gaming...

...back later!


MA

Monday 21 July 2008

3 Shades Of Wii... and Johnny Lee

(that's pun #2 up there... guaranteed to get much worse as this project progresses)

Below is a list - which I shall build up - of all the software that I've found, and will subsequently fiddle with and document in a fair amount of detail... but very briefly -

(note: if the software is for use with a PC then I'll assume that BlueSoleil is running and a connection between the Wii Remote and PC has been established)

glovePIE - script driven software that runs on a PC that senses all the movements from the Wii Remote including the accelerometers. The most flexible solution with a high learning curve.
(http://carl.kenner.googlepages.com/glovepie)

WiiCade - this is a Flash API that allows you to create a Flash application with Wii Remote control other than mere pointing and clicking, more buttons are supported, intended to be run through the Wii Internet Channel.
(http://labs.wiicade.com/index.html)

WiiFlash - Probably the most exciting out of the lot because it allows you to directly access the Wii Remote from Flash using actionscript. It's also possible to connect and differentiate between up to 4 remotes and nunchucks. The major downside is that there isn't currently any access to data from the accelerometers on the Remote. You also have to run a piece of software called WiiFlash Server that may require you to update your .NET framework, although it runs transparently and doesn't need any configuration.
(http://www.wiiflash.org/)

Johnny Lee - OK, so he's not a piece of software but it would be stupid to be writing this without mentioning his research. Lee has come up with many ideas for implementing the technology inside the Wii Remote including an interactive whiteboard and many small 3D experiments that have to been seen! Anyway, his work has become quite an inspiration for my project - if only in terms of the innovations...
(http://www.cs.cmu.edu/~johnny/)

Thaaaaaat's all folks...

MA

Thursday 10 July 2008

Wii Things Amuse Wii Minds...

Phew! After a little while, I'm back with my account of my Wii little adventures (that's pun #1...)

In the past, there have been many systems, gizmos and gadgets released that have incorporated some sort of pointing device. To cut to the chase, none have proven so sucessful, at least on such a widespread scale as the 'Wiimote' used as the primary control device for the Nintendo Wii games console.

There are sensors to detect movement in all directions, including the speed (or rather acceleration) of those movements. The remote can also sense it's tilt and pitch. The main use of the remote however, is to point at the screen and interact with various elements presented on the television. To achieve this, a series of infrared LEDs are placed above or below the television. The remote has a camera built in to it's point that senses the position of the infrared LEDs and interprets this information as a position for a cursor etc. on the screen. Yes, that so-called 'Sensor Bar' that is placed on your TV doesn't sense a single solitary atom of information... all the communication is between the Wiimote and Wii using Bluetooth!

Anyway - the point of me waffling about the Wii Remote is that it's possible to use all it's functionality with a PC!

The best part is that it's actually a relatively simple process to make the connection between Wiimote and PC.

You need the following (links at the end of the post)...

1. a Wii Remote
2. an actual Nintendo Wii OR a wireless sensor bar - you need this for the pointing aspect of the remote. However, you could even use several candles if you wanted to!
3. Bluetooth connectivity on your computer (I'm using a PC with Windows XP for the record...)
4. BlueSoleil - this is the software that will actually detect and pair your Wii remote to your computer
5. glovePIE - finally, this is the software that reads the information from the Wii remote's sensors and provides appropriate feedback - in this case, through mouse movements and mouse clicks!

The only thing that remains is to tell glovePIE what you want it to sense from the Wii remote... The most reliable (but by no means the only) code I've found for controlling the mouse so far resides here:

http://www.wiili.org/index.php/GlovePIE:Carl%27s_IR_Mouse

Just paste all that code into the glovePIE code view and press the 'run' button at the top! ...and Bob should be your mother's brother...

I shall return when I've managed to write some of my own code for glovePIE :)

Links...
http://www.wiiprojects.org/bluetooth.html - useful for setting up BlueSoleil
http://carl.kenner.googlepages.com/glovepie_download - glovePIE download page
http://www.wiili.org/ - everything else you'll need to know for research and scripts for glovePIE

Wednesday 11 June 2008

Sensing stuff...

OK, here's another set of methods of getting information into the computer, other than my webcam experiments.

A short while ago I read a very inspirational book by Brendan Dawes (http://www.brendandawes.com/) called 'Analog In , Digital Out' (at Amazon UK). He's one of the gurus on Flash and all things multimedia. His book focusses on the ways that analog or real-life sources of data, like light and sound, can be converted into useful and meaningful data on a computer.

His experiments include making a doorbell ring when someone visits his website, and gathering colour, size and shape data from a webcam trained on a piece of playdough - where the playdough was the user interface...!

All sounds strange but these two examples alone have given me lots of ideas and influence on my project.

The doorbell example was created using the following kit:
http://www.makingthings.com/products/KIT-MAKE-CTRL/
This electronics kit connects to the computer using either USB or ethernet and can have an array of sensor devices attached to it. These sensors include those for light, infrared, pressure and a series of switches. It's also possible to send signals out to the device and control devices like motors and LED lights.

The data is received into Flash using a custom actionscript class as a stream of numerical data. It's then moreorless up to the designer to use the data as they see fit.


The playdough example was created using a combination of a webcam and a piece of software called Cycling74 Max 5. The software company originally began by making audio-plugins for editing suites on the Apple Mac. Using the program's video capabilities, it's possible to detect an object's size, colour and whole load of other variables...

Lastly, a lot of the examples in the book employ a programming language called Processing, which is derived from JAVA. The description from the website says...

"Processing is an open source programming language and environment for people who want to program images, animation, and interactions. It is used by students, artists, designers, researchers, and hobbyists for learning, prototyping, and production."

Processing is an incredibly versatile language that makes programming specifically for graphics a complete cinch. Many of the classes you would have to explicitly call if using a traditional JAVA compiler are readily available. I downloaded a special class that enabled me to use my webcam within the Processing environment. The example I tested consisted of around only 50 lines of code. It enabled the user to wave their hand (or any other object) in front of the camera and attract a virtual tennis ball to their fingertips... I'll provide an example on my website soon!


These are the 3 main programming environments I shall research and employ during the course of my project...


MA

Jean Michel Jarre - An Introduction...

The first port of call for my research into unconventional user-interfaces begins with Jean Michel Jarre and his amazing laser harp! First, watch the video below...



For those who haven't heard of Jean Michel Jarre, he is one of the most innovative electronic music producers of our time (well, in all fairness, ANY time as he's only been producing since the mid 60s) in the way he pioneered the use of the first synthesisers and continued to do so.

He's also renowned for his live performances which include:

Rendezvous Houston (text shamelessly from http://en.wikipedia.org/wiki/Jean_Michel_Jarre)

In 1986, NASA and the city of Houston asked him to do a concert to celebrate NASA's 25th anniversary and the city of Houston's 150th anniversary.

During that concert, astronaut Ronald McNair was to play the saxophone part of Jarre's piece "Rendez-Vous VI" while in orbit on board the Space Shuttle Challenger. It was to have been the first piece of music recorded in space, for the album. After the Challenger disaster of January 28, 1986 which killed McNair, the piece was recorded with a different saxophonist, retitled "Ron's piece" and the album dedicated to the seven Challenger astronauts.

The Houston concert entered the Guinness Book of Records for the audience of over 1.5 million. During the concert, Houston native Kirk Whalum performed Ron McNair's saxophone part on "Ron's Piece". The concert featured giant projections of photographic images and laser patterns onto the buildings of downtown Houston, including a gigantic white screen on the front face of the Texaco Heritage Plaza building, which was under construction at the time. Due to vehicles stopping on the freeway passing the concert venue the freeways had to be closed down for the duration of the concert.


Twelve Dreams of the Sun

On 31 December 1999 Jarre held a spectacular music and light show in the Egyptian desert, near Giza. The show, called The 12 Dreams of the Sun, celebrated the new millennium and 5,000 years of civilization in Egypt. It also offered a preview of his new album, Metamorphoses.

The concert which started on new years eve and followed all the way through to the dawn of the new millennium in a 12 hour spectacular which including many performances from local artists and musicians, the concert used the backdrop of the great pyramids to project images onto, but fog during the evening concert by Jarre caused the projections on the facades of the pyramids to be blocked from view. Jarre played for around two hours during the build up to the new millennium with a countdown at midnight and spectacular firework display and then returned on stage in the early morning to perform a second slot to see in the first sunrise of the new millennium.

The following is a clip from Twelve Dreams of the Sun. It shows the countdown to the new millennium - forget London or NYC for the year 2000, this is amazing...



Anyway, I'm slightly off the point here... the focus of my research into Jean Michel Jarre is mainly on the innovative controllers for his synthesisers which include the laser-harp featured in the first video...

...more later!


MA

Tuesday 10 June 2008

Project Ideas

One of the aims of this blog is to document my work on my final year project for university... It's a facility for me to write down all the interesting bits and pieces I happen to discovery along the way!

At the moment my ideas are still coming together for my project. I'll be focussing on the following topics over the next few weeks:

1. The way computer games utilise music.
2. Unconventional user interfaces in - a. Computer games, b. Professional music software, c. Studio/Live artist performances.
3. Various programming langauges that support such interfaces.

4. ...whilst all the time creating/programming experiments, which demostrate some findings of the above points!

Just thought a small bit of clarification was needed before I plunge ahead (for me as much as you, the reader!)


MA

Monday 9 June 2008

Rez - Gameplay videos...

For those interested, the following links are complete gameplay videos, from Youtube - wish I was good enough to get past Area 3... C'est la vie...

Area 1
"Buggie Running Beeps 01" / Keiichi Sugiyama
http://uk.youtube.com/watch?v=7hh9fZkr1jk

Area 2
"Protocol Rain" / mist
http://uk.youtube.com/watch?v=A4EFNWe4mCc

Area 3
"Creation The State Of Art (Part 1 - 6)" / Ken Ishii
http://uk.youtube.com/watch?v=yzoGoAo0ZMA

Area 4
"Rock Is Sponge" / Joujouka
http://uk.youtube.com/watch?v=cCh6WlK027I

Area 5 / Last Boss
"Fear" / Adam Freeland
"Boss Attacks" / Coldcut
http://uk.youtube.com/watch?v=3nq_oMDlrtM (an awesome 26 minutes long!)

Enjoying watching!


MA

Sunday 8 June 2008

Rez

Rez is one of the only games centering around music that can truly get away with it's abstract graphics. I suppose the developers got around having to explain the surreal graphics by saying it's set inside a computer - where allegedly anything can happen :P

The blurb on the back of the PlayStation 2 (I can't account for the Dreamcast box-art) release is wonderfully vague:

Discover a new world
A world of sound, visuals and vibrations
Enter the network and awaken 'Eden'
Release your instincts
Open you senses

(...and in the smallest writing but the most important!)

Experience synesthesia (http://en.wikipedia.org/wiki/Synesthesia)

Without proceeding too much further, have a look at the video below...



The ONLY idea of this game is to aim and shoot. The player doesn't have to worry about navigating around the level or running out of ammunition. This game is known as an 'On The Rails Shooter' which essentially means that the computer has complete control and all you need to do is shoot - simple. Though, not hugely simple(!) If you don't shoot fast enough and/or accurately enough you'll 'die'...

OK - the musical aspect of the game. There are 5 'areas' that make up the game. Each area has it's own piece of music. These are tracks that have been composed by 'real-life' artists. While each track is a proper piece of music in itself, they've been stripped down piece by piece and split into stages to match the pace of the game. That is to say, that at the beginning of an area, it's generally a slow start in terms of having things to shoot at, therefore, the music only consists of a basic drum rhythm. Each area is split into 10 stages. At the height of the action, the music will sound very 'busy' with all the usual parts in place (drums, bass, synths, percussion...)

After harping on about all the shooting and the music, the main part of the game is the experience that the player gets. Everytime they shoot something, a percussive noise, synthesiser note or sound effect is played in harmony with the rest of the music. When an enemy has been dispatched off the virtual coil, there is a small light-show explosion. It's difficult to explain but the way the enemy explodes visually matches the exploding sound... if that makes sense at all (see the Wikipedia link above, yes I KNOW Wikipedia is genrally a no-no, but in this case it's actually a good pool of information, so there...!)

So, to conclude...

The graphics and overall aesthetic of the game will play a huge influence in the way I think about the way I design my application - whether it turns out to be a game - or not...

Links...
Official site of the original Dreamcast/PS2 game - http://www.sonicteam.com/rez/e/news/index.html
Official site of Rez HD for the Xbox360 - http://www.thatgamecalledrez.com/
Wikipedia entry for Rez - http://en.wikipedia.org/wiki/Rez... There's a couple of pieces of information that may prove interesting...


MA

(Rez shall return in this blog...)

Saturday 7 June 2008

DJ Max Portable meets My Webcam - Mockup

This is roughly what I'm looking at making. I'll be using code from my previous webcam examples and merging that with the beginnings of code that will judge whether the user ('player' is such a strong word at this stage!) has made a motion at the correct time and in the correct place on the screen.

The example shall work as follows:
1. The blocks fall down the screen the image of the user.
2. The user shall jab upwards into the picture with their right or left hand when the corresponding block reaches the thick line at the bottom of the screen.
3a. If the user responds early, late or not at all then nothing will register (- in DJ Max Portable terms, this would count as a failure and would reduce the chances of finishing the song)
3b. If the user judges the timing correctly (there will be a reasonable margin for error here) then the game continues...

Watch this space...


MA


DJ Max Portable on the PSP...

Well, here we have DJ Max Portable for the PSP. I'm not trying to write a review of the game, rather explain how it works.

The simple idea of the game is to press the correct buttons on the PSP in time to the music. The blocks falling down the screen (see the screenshots) indicate which buttons to press. When the player presses the correct button then they've contributed to the song by triggering a sound. Throughout each song in the game, the button presses add everything from rhythm parts to synthesiser sounds. The more accomplished the player, the more pleasing the song will sound.

If the player makes too many mistakes then the game will exit the level/song and display a message that instructs the player to get more practice. Because of this, the game has quite a steep learning curve.

The difficulty of the game is determined by several factors.

1. The speed/complexity of the song that's playing. The faster or more parts that the song has, then the more blocks will fall down the screen.

2. The number of buttons the player has to use. The player can select to play using 4, 6 or even 8 buttons on the PSP. Personally, playing with 4 buttons so far has proven to be quite tricky!

The music you play to is graded in terms of difficulty, so initially the gameplay feels quite sedate, though after the first couple of songs are out the way the pace quickens somewhat dramatically!

So far this game has proved quite influential in terms of my project. I'll be trying to build a small concept project where the player will have to move in front of a webcam to the rhythm of the music rather than pushing buttons. So far the accuracy of detecting motion on specific parts of the screen using a webcam (see my examples if you can!) have been a bit sketchy so I'll be trying the DJ Max Portable equivalent of '2 button mode' for the time being...

So, the view the player will have is of themselves on the screen with blocks falling down over their image. When the blocks reach the bottom of the screen, the player will make a motion (I'll figure the precise motion out at some point!) over a specified area of the screen to 'clear' the block and enable them to progress through the game...
...hopefully some of that makes sense!

Videos of more talented people than me playing DJ Max Portable 1 & 2 on the PSP
http://uk.youtube.com/watch?v=2pxsq-nA6o4
http://uk.youtube.com/watch?v=09VLs3nqE7M
http://uk.youtube.com/watch?v=zfMlAv7ABEg
(the last link will give you an idea of how frantic the gameplay gets!)

From here:
Mock-up images to demonstrate this idea - pictures are a thousand words which means there will be less stuttering from me!


MA





Wednesday 4 June 2008

Summary: Games centering around music

Some of the most surreal and original computer games over the history of console and PC gaming have involved mixing musical elements with engaging visuals and/or artwork.
I'm in the process of investigating a selection of games that involve the player with music in some way.

Some of the games have the player actually contributing to the music - with each button press triggering a sound... example: DJ Max Portable/Guitar Hero

...all the way through to the music merely being used as an indicator of the player's progress through the game where the music 'builds'... example: Rez

Finally, there are some games where music creation is the only purpose. I won't be focussing too much on this sort of music game - because there isn't really a 'game' element. The player doesn't progress in any way and there aren't any goals or challenges.

Tuesday 3 June 2008

Detecting motion in certain areas...with a webcam - part deux

This example is similar to the other area detection example - however it's more refined, uses 'slightly' more sophisticated code to detect the certain areas, AND is more fun to play with.

When you start the example, you will see three blinking dots towards the bottom of your picture. These are the hitpoints where the motion is sensed.

Area Detection example 2

I've found that raising your hand up relatively quick up into the picture works quite well! It's way more useable than the first example - in my little honest opinion


MA

Detecting motion in certain areas...with a webcam

Next - it would be handy to detect motion in certain areas of the screen. The following example detects motion in each corner of the camera's picture - like a 2x2 grid.

Each corner plays a different sound when you wave your hand in front of it. Now - it's not the best sort of detection by any stretch of the imagination, but have a bit of a play and see what you think...

Area Detection example 1

Have fun playing many tunes...!

Simple motion detection using a webcam

Well, I want to make some kind of music-based program or even a game. I haven't quite decided what I'd like to make though, however I'm going to be mucking around and experimenting with wild and wacky user interfaces. Using a webcam as an input device seems a good place to start - the mouse and keyboard are boring :P

So the following link will take you to my first experiement - motion detection. You obviously need a webcam for this otherwise nothing will happen(!). If you're using an Apple Mac with a built-in webcam you may need to select the correct camera device - for some reason there are a few in a list to choose from!

Motion Detection Example

The program senses a certain level of motion in front of your webcam. I guess it depends on which webcam you have - I have the Microsoft VX-1000 and it seems sensitive enough... Let me know how you get on...

At some point I'll upload videos of me waving manically at my computer screen - good times...


MA

Glide Labs' new home!

This is the home of the news for Glide Labs - the nickname for my final year uni project!

Here will be all the research, programming experiments and all kinds of other things...

Back with 'all kinds of other things' in a moment...


MA