Travels

Wednesday, November 21, 2007

Chumby

Recently I came upon a device called the Chumby. If you haven't heard of it, the Chumby a compact computer that displays information from the web via wireless. It has a touchscreen, 2 usb 2.0 ports, an accelerometer and a squeeze sensor. Best of all, it is designed to be easily hacked both for software and hardware. Anyone can make widgets for the Chumby using Flash Lite 3.0 as well as a variety of other languages (Chumby is Linux based). The screen is 320*240 and the recommended framerate is 12fps. Looking over Chumby.com's wiki, it looks like things are very well documented with example files to download and try out.

I think the idea of the Chumby is very cool and I'm excited to try it out for myself. At $179.95 it is a little pricey but, it is exactly what could integrate the internetin new ways to affect our daily lives (especially with web 2.0 technology like RSS). Imagine having a Chumby in your kitchen, you could get recipes off the intenet, watch online video, listen to internet radio, check the weather and traffic while you have breakfast, and read the daily news. I myself would be interested in a Skype widget so I could use it like a phone.

There's a bunch of cool widgets and features already available for the Chumby at the official website: www.chumby.com.
So check it out for yourself.

Monday, November 12, 2007

Making Flash games for the Wii

Recently I was shopping at Circuit City and found something interesting. It was a program called my Wii Manager. This software that allows you to download, edit, and share your Mii characters; so far you might not be impressed. But what the software actually is, is much different. It includes a programmable input emulator with an archive of programs for using the Wiimote on the computer. So it allows you to relatively easily connect your Wiimote to your computer and receive and use its serial input to control your mouse. It runs without a UV sensor so all moving is done by tilting the Wiimote; the cool bit is that it can detect tilt, thrust, and some other movement as well as make the Wiimote vibrate and light up its LEDs.


The real reason why I bought the software was that it came with a Bluetooth dongle and the whole thing cost about $20. When I was searching for a single Bluetooth dongle, the prices were usually closer to $30. So with this software you not only get the dongle but the emulator with program archive and some documentation. For my money, this is a pretty good deal. The main thing that had been keeping me from playing with making Flash games for the Wii, was that it was too much work to figure out how to set everything up and get it working reliably before I could get to making games. So if you're curious about making Flash games for the Wii, check out my Wii Manager.

After setting everything up (took about half an hour of reading and fiddling about) I played with a couple of old Flash toys I made. The results were pretty encouraging. A while ago I started working on a gesture class that maps various types of mouse movement to specific gestures. The goal was to add a greater sense of immersion to gameplay through more familiar and intuitive interactions. When I tried playing with the old toys I made using this class, they mapped wonderfully to the Wiimote and the interaction felt nice. So I've decided to slowly make a bunch of minigames using the class which later on I'll put together in one larger game. This will take a while though since I'm still in the middle of redesigning my website. Hopefully I'll be able to squeeze in a minigame or two along the way. Once I've finished a couple of minigames, I'll post the code and the games at my website.

Thursday, October 25, 2007

The Delegate Class: Brother where have you been?

Eureka! I've had a specific problem when writing AS2 classes for some while now. Namely, whenever I use code to make an interactive element (Let's say a movie clip that bounces away when you click on it), I have to nest the event handler's method. The problem is that this changes the scope and so the handler method can't access my classes base methods. The way I used to fix this was by making the methods I want to access Static, and accessible by anything in my class. The problem with this is that if I make a method static I have to make its variables static, and that can create a domino effect of making things static just to solve the original problem. This is pretty wordy so I'll post code that is easier to follow. Here's the old way I did things:

class SomeClass {
//constructor
public function SomeClass(someMC) {
//initialize object
initialize(someMC);
}
//this is static so the onPress method can access it
private static function doSomething() {
trace("Ok, I'm doing something");
}
private function initialize(someMC) {
trace(someMC);
//define what it needs to do when it loads
someMC.onPress = function(){
doSomething();
}
}
}

This is a very simple version of the problem. In reality the method my handler calls would probably be called by other methods and use variables that all would need to be made static. I knew this was not a good way to do things but until now I didn't know what else I could do.

Thanks to the Delegate class though, I'm able to specify the scope and therefore access the methods at my class' base level. Here's the same code as above but made with the delegate class:

//import the Delegate class
import mx.utils.Delegate;
class SomeClass{
//constructor
public function SomeClass(someMC) {
//initialize object
initialize(someMC);
}
private function pressHandler() {
trace("You pressed it.");
}
private function initialize(someMC) {
//define what it needs to do when it loads
someMC.onPress = Delegate.create(this, pressHandler);
}
}

Now there is no need for static so things are much easier when I need to tweak things later on.
While I was researching how to solve this problem I found other possible solutions but this was the one I understood best and was able to easily implement.

You can read all about the Delegate Class here: http://www.actionscript.org/resources/articles/205/1/The-Delegate-Class/Page1.html

This is all great to know but this problem has been resolved in Actionscript 3 thanks to its addEventListener method. Still if you're using on Flash Lite or like me your work doesn't want you to use AS3 until the Flash PLayer 9 adoption rate is higher you may find this very useful.

Good luck using the Delegate Class, and if you have other solutions I'd love to see what you have come up with.

Tuesday, October 23, 2007

Tip for Text in Flash

I was working my way through the hefty, 900+ page book Essential Actionscript 3.0 with the hopes of finishing it by the month's end when I learned something new. It has happened to me before that I wanted to use some dynamic text as part of something that rotated, skewed, or changed transparency. This never seemed to work so I always resorted to breaking the letters apart into graphics and abandoning the idea of dynamic text. Today, as I was reading page 705, I learned that dynamic text can be used in all these wonderful effects as long as you embed it. I did some tests and it is indeed true. Just make sure that you embedded all the symbols necessary, otherwise your text might be missing things when you render the swf.

You can see this in action in the new widget I've made for this blog, my Flickr Image viewer. This widget gets the 20 most recent pictures I've uploaded to my Flickr account and makes a cross-fading slide show with captions. As you can see I have embedded the font I use so the text as well as the images fade in and out. I made this widget with the help of the SWX technology created by Aral Balkan which allows Flash to easily access Flickr API (and others) easily without writing any server-side code.

Wednesday, October 17, 2007

Back in a strange new place

It's been a while but I've decided to keep this blog going. I've started working at a new job since my last post and moved to a new city. I'm very happy to say that my new job sent me to FlashForward 2007 in Boston, and I had a great time! There was so much there that inspired me that once I got home I felt overstimulated. There was too much for one post, so I'll be spreading things out over several posts.

Let me tell you about animation. The best things I learned for animation probably came from Chris Georgenes' talk. He went over some animation tricks and showed us some nice animation clips. I found the tips on lipsynching especially useful. Here's the gist:

1. Make a mouth graphic symbol (it must be a graphic).
2. In the symbol draw all the mouth shapes you want to use. You can use onion skinning to help you position the mouths.
3. Go back to the main timeline and add a keyframe, click on the mouth symbol, make sure single frame swapping is selected, and then enter the number of the frame with the mouth shape you want.
4. Continue as desired and that's it. You've learned single frame swapping.

You can watch a video tutorial of this as well as several other useful Flash animation tutorials by Hayk Manukyan at his blog: http://moolt.blogspot.com/2007_09_01_archive.html


I like this feature but it can get confusing remembering the frame numbers if you have many shapes. Once things ease up at work I think I will make a Flash extension for lipsynching that uses this feature but adds visuals so there will be no need to memorize the shapes.

Wednesday, May 30, 2007

Some pictures I took

I just wanted to share some nice pictures I took. The one below is a pregnant doe that I managed to get close to.


This next picture is of of a moth that was resting on the window of my office.


The area where I live has many redwood trees. In case you don't know, redwood trees tend to grow in circles around a "father tree". This is a picture of the remains of the "grandfather tree" from which all the redwoods in my area were grown. The trunk is about 21 feet around and is hollow because it was burned by fire several years ago, possibly because it was struck by lightning.

Saturday, May 26, 2007

The website went live

It's been a while since my last post so let me catch up on what I've been up to. The biggest thing that happened was that the website I was working on finally went live. I'm glad it did because now I can get back to animating. I'm sort of glad I got to work on the website because I had an excuse to learn PHP and SQL. Now I'm planning on redoing my portfolio site while everything is fresh in my mind. Besides learning server-side scripting, I also learned AJAX (Asynchronous Javascript and XML). If you're not familiar with it, AJAX lets you call functions on your server after a page is loaded, and then update your page without reloading it. I used AJAX to make a live search feature which gives you suggestions for searching while you are typing. My live search is mostly based on Google Suggest.

Since my last post I have also done a couple things to entertain myself. A couple weeks ago I decided that I needed a hat and since I know how to crochet, I decided to make one myself. But, instead of buying a crochet hook, I thought it might be interesting to make one myself. So I went into the woods and found a thick branch and started carving it with a box-cutter knife. It took two evenings and two attempts but, I created a hook. After I sanded it a bit with a nail file I found it was reasonably smooth and worked like a charm. I made a hat with some wool I got from a nearby town. After it was done I decided it looked more like a woman's hat and I gave it to a friend.

Another day I decided to make a Tomato Soup Cake to have a bit of fun. It was a real scavenger hunt when I tried to find all the ingredients I needed. Sugar was especially hard to come by, but I managed to get everything I needed. It was delicious ( tastes like a spice cake).

Thursday, May 3, 2007

In need of more excitement

It looks like our website if finally about to go live. I'm glad because I would rather start working on the animation again. I believe I finally came up with the best way to make all the character keys for the animation. I create layers for the base colors of each key, and then I put them into folders and add layers to my heart's content. The biggest problem making the rabbit was that I didn't label all the layers I made (and I make a good deal of them). So now, once I'm done, I just collapse the contents of each folder and viola! I've got a leg, or ear, etc. ready to be rigged for animation. Another problem I am facing in animating is rigging. I'm very happy to be using Anime Studio Pro, which is the best 2D animation software I've ever used, but using bones to get raster images to deform perfectly is tricky. I may end up cutting the legs up a little so they don't looked so scrunched up when they deform.

I'm always happy to be finished after work but lately, I think I need to find something new to do. I have a book by F. Scott Fitzgerald to read but, I would rather read something else. It may just be time to take a weekend trip to the city to get a better book and buy some music. I need music becuase I didn't have a chance to transfer my collection to my laptop before I left. I'm just glad there is internet radio, though it sounds like there might not be for much longer.

Finally here's a bit of excitement: Yesterday morning I found a scorpion in my yert. Check it out! It was sitting right inside my door, in fact the wood you see in the picture is part of my doorframe. I got it out by picking it up with a stick. It was pretty angry though and started attacking the stick. Luckily, this type of scorpion isn't very poisonous, but I still don't want living in my house.

Here's another picture I took near my house. Though it's less exciting. These two deer live in the woods next to my house so I've seen them a couple times. I think the female is pregnant.

Tuesday, April 24, 2007

Sites and Sights

I'm still working a lot implementing new content on a website. It's not bad, but I realize I like making interactive content much more than web pages. One cool thing I stumbled upon was Google Co-op and Statistics. Google Co-op is a service that let's you and up to 99 of your closest friends create a search engine customized to fit your needs. I've been using it to make a search engine that return results only from our affiliated sites. It works pretty well, though if you add content to your site you need to get Google to update their database before it will show up in your engine. One thing I had to do was to make a hack so the results would show up integrated properly in our web page. Since we use PHP to generate or webpages, it was a little trick. The hack was to send the results to a content page and then call that page from a .php page that was identical to our index.php except the default content loaded was the page containing the search results. Kind of tricky but it looks like it works.

On the less technical side, I took a long walk to the beach on the weekend. The walk takes about an hour and a half. Going there is fine but, coming back is harder because it's all uphill. The beach was breathtaking! It looks like something out of a movie. Other people must think that too because when I went there, everyone on the beach had expensive looking cameras. I thought perhaps it was a photography club out on a picture taking excursion. When I got to the beach my legs were tired and since the water is really cold I decided to wade in it. I learned a while ago on a trip that if you are hiking and then wade in really cold water, it stimulates your circulation and makes your aching legs feel much better. It worked pretty well though I think other people on the beach thought I was crazy to get in the water. I walked around the beach for a while taking pictures, then I climbed up the cliff to take some more. I still wasn't wearing shoes when I climbed the cliff and when I got to the top I found out there were a lot of thorny shrubs. There was a path though, so I stuck to it and tried to minimize my stepping on spiny plants. The view from the cliff was spectacular. When I walked down the cliff I realized there was a path to go up it, and I didn't need to climb like I did coming up. There's always a lot of big bits of seaweed on the beach in this area. I remember coming here years ago and enjoying the sound of hitting the hollow tube seaweed against rocks. The beach was fun and I found two seashells which is a feat considering most west coast beaches I go to don't have any seashells.

The walk back was slow and by the time I got home I had eaten most of my king sized bag of trail mix. The next day I was also surprised that I was not as sore as I thought I would be.

Wednesday, April 18, 2007

PHP keeps animation at bay

I've taken a hiatus from working on the animation for a while. It looks like I would be more useful working on updating webpages here. I don't mind because I was thinking I needed a break from painting art all day; plus to make it worth my while, I decided I would trade work with the web designer. She's working on the art while I work my way through pages of PHP.
I'm happy because she's doing a good job, I just hope I can get all these pages under control.

Yesterday I realized an inconvenience of living in a yert. I was taking out my contact lenses with the case on my knee and it slipped off. Normally that wouldn't be a big deal but, the lens fell through the crack between the wall and the floor and landed outside on the dirt ground. It's pretty cold here at night so I had to put on warm clothes to go out and get it and then, to wash it off I had to walk through the woods to the bathroom. I'm starting to have more and more respect for indoor plumbing.

Friday, April 13, 2007

Wild Animals

I spent all day perfecting the art for the rabbit. I think I've figured out the best way to make art so all of the 5 or so other characters should go more smoothly. It's hard to judge whether making art digitally is going to be better than scanning in painted art. So far it doesn't seem any quicker, but I am very happy with the quality of the art. After painting all day I was pretty tired, so after work I went across the street to the kitchen to get some dinner. But on the way there I ran into a herd of wild pigs. I think there were about 10 of them. They were running around and making a lot of noise. Their footsteps almost sounded like the waves on a beach. Since I am used to the woods most wild animals don't bother me, but pigs are the exception. I think it's because when I was younger I used to play a game where you had to get past some wild boars by spearing them on horseback. If you lost the boar would knock you off your horse and kill you. I don't know too much about how dangerous a wild pig is, but they do have tusks and I'm keeping away from them.
As I was walking back home after dinner, I was still a little paranoid about running into the herd of pigs. So when I suddenly heard a scrambling noise I jumped a little bit. The noise was the fox I saw before. This time he was inside of a parked pickup truck. The owners had left their window open about 6 inches and the fox squeezed through and was looking around the inside of the cab. He must have gotten freaked out at being in the cab because he jumped out in a hurry. Then he stood there and looked at me for a while. I told him that he looked busy and he trotted off.

Thursday, April 12, 2007

Living in a yert



Now that I have been settled in enough to realize I am neglecting my blog let me tell you what it's like to live here. I live in a yert, that is a Mongolian tent home. Here's a picture of it. It's actually pretty comfortable besides being chilly. There are a number of bugs that live in it with me but, I don't really get bitten so it doesn't bother me. In fact living with some bugs around can be kind of cool if the bugs are moths and they look pretty. Check out this one I found on a window at my workplace.

The main thing I miss is indoor plumbing. The first couple of days after I arrived I had food poisoning and there's nothing like vomiting in the woods a couple of times to make you homesick. After I recovered it was much more pleasant. Another strange thing about living in the woods is the giant slugs that you sometimes find. I remember the first time I saw one I thought it was some fresh animal dung but then it started to move. When you need to go to the bathroom in the middle of the night you have to be careful not to step on them. Just to give you an idea of how big these slugs really are I made this handy picture of one next to a new number 2 pencil. In fact I think this slug was longer than the pencil, but when you get near them their heads suck up into their bodies so they look fatter and smaller.

One thing I love about living in it is the sounds I hear at night. Since I live in a forest full of wildlife there is a full chorus of night sounds to listen to while I lay in bed. Now you may think you know what a forest sounds like but it's nothing compared to what it sounds like late at night. All sorts of night creatures wake up that you have never heard in the daytime. It reminds me of the sounds you would hear in an old Disney cartoon if the characters went into a jungle.

I've begun working on my animation at last. I am animating a story called "The Rabbit Who Overcame Fear", it's like Chicken Little, with a rabbit and a falling mango that scares him. It's a Jataka Tale, which is one from a collection of stories of the past lives of the Buddha. As I was researching the story I was surprised to find that many of the Jataka Tales are the basis for modern children's stories. It seems that after the Jataka Tales were created, they spread to Persia and then through Alexander the Great to Europe. It's pretty funny to see the changes that each culture made to the stories. I read several versions of the rabbit story and in each one the falling mango was replaced with a new type of fruit. I think if I were retelling my version of the story I'd make the fruit a Durian. With all those spikes I bet they could do some real damage. My old roommate used to call them the king of the fruit.

Here's an in-process picture of the rabbit I am making for the animation. I think the animation will look pretty nice, though I wonder how long it will take to make the art. After all, this story has as many characters a Chicken Little, they just don't have clever names like Turkey Lurkey and Goosey Loosey.

Monday, April 9, 2007

Go west my man.

Hey I'm Luftbuefel, LB for short and I'm an animator and programmer that decided to take a break from stresses of everyday life to go do some volunteer work in the middle of nowhere in California.

So I've lived in California before so it's no big surprise to me but I still find the differences to be very noticable. For instance, on the way to where I was going from the airport I stopped by the supermarket to get some soap and shampoo. Then I realized that the store sold only organic products. I have nothing against organic stuff, I just don't care too much about it either way, and with my current lack of income I don't want to pay more for organic. Either way, I got some shampoo, conditioner, soap, and since they didn't have any rags I got a body scrubber ball. That's all I bought and when I got to the cashier she asked me if I was doing some deep cleansing. Not really knowing what else to say, I told her I was and she smiled. I'm not really sure that I had a reason to be, but I was embarassed.



The great thing about the trip up to where I'm staying was that we stopped again at another store which was very Californian but in a different way. The store had a wooden porch on it and looked a lot like a building you would see in an old western. Best of all it has two signs: one advertising rabbit meat at $5.99 a pound, and another for a sale on buffalo burgers.

Also pretty close to this store was Bodega Bay. This was where Alfred Hitchcock filmed his excellent film "The Birds". There weren't too many birds around when I was there, but where I'm living there are some pretty huge ravens that look like they could take on a man.

Anyway, where I'm living now is ridiculously beautiful, there are wild animals everywhere and they're not to used to humans. So it is pretty easy to get close to them to take good pictures. Here are some deer I saw as I was walking home from work. A couple of days ago I counted all the deer I could see in the field I was in and I got all the way to 15. Besides all the deer, so far I've seen several flocks of wild turkey, a family of quail, lots of ravens, a tree frog, some monster slugs, and a red fox carrying something that looked like a white pipe in his mouth.