I am an Interactive Multimedia Student at Sheridan College. As a part of our course I got introduced to an amazing technology called “Ostrich Technology”, created by our Program Co-ordinator, Dan Zen. This is a very interesting and entertaining piece of programming that can be used to create interactive gesture apps.
Few Words about Ostrich Technology:
Ostrich Technology allows us to locate motion using Flash and a simple webcam. Some of us may be familiar with similar tech concepts used in gaming consoles like Wii, Xbox and PS3.
Ostrich Technology captures motion by calculating the difference between colour in adjacent video frames. It subtracts each point of frame colour with the next one. When there is a colour difference there is a motion. Then a threshold is calculated and changes the colour to green. There is a method in Flash by which we can create a rectangle arround the green colour. This rectangle is called “Motion rectangle” and cursor is placed in such a way that it is always on the top left of the Motion rectangle. Thus you can make things follow your motion or create buttons which trigger when things rollovers or holds over the button.
For more details about Ostrich Technology, samples, code and video, go to http://ostrichflash.wordpress.com
My experiments with Ostrich Technology:
I created a small game using Ostrich. My game involves the player helping Jerry, who is being chased by tom, to reach his home. I combined the code from fairy.as and samplebutton.as. You can find fairy.as and samplebutton.as files inside the “Download Ostrich ZIP” file in http://ostrichflash.wordpress.com . I replaced Fairy with Jerry and made Tom to follow him by giving a damping effect to his movement.
Code I used to give damping effect is :
//make Tom to follow Jerry with a damping effect
var damp:Number = .1;
var differenceX:Number = jerry.x – tom.x;;
var differenceY:Number = jerry.y – tom.y;;
tom.x = tom.x + differenceX * damp;
tom.y = tom.y + differenceY * damp;
I used onHold method of OstrichButton to display new screen once Jerry reach home.
I used OstrichCursor and OstrichButton in developing this. Jerry is attached to the OstrichCursor and Tom follows Jerry.Jerry’s home is a OstrichButton and once Jerry reaches home, the game is over.