Code Monkey Tries to Animate

As I mentioned that next step is adding animations. It’s a bit daunting to me to be honest. To start I skipped the video and downloaded the files Tree House provided. They were 22 Crystal Ball images where they ball basically lit up all mystical like and then faded back to the original. Once I saw that I thought about what I wanted Yoda to do. Speak the answer, obviously. I fired up Episode I and found a scene of Yoda talking. It was harder than I expected to find one of him close up and straight on, but I found one from the Council Chambers that should work well. That, as it turns out, was the easy part. Next I had to compile a number of screen shots from the film. Not too hard using VLC. Then cropping them all since I didn’t want the entire frame. THIS was difficult. I found a plugin for GIMP that allows batch editing of images so you can do the same thing to multiple images. Perfect! Except it only allows some basic fuctions, which while cool and time saving, still left me with a lot of work to do to get my 52 images ready to animate. I used the plugin to crop them all to the same size. Then I went through each one individually and applied an elliptical cutout around Yoda using the same X, Y coordinates so that he wouldn’t bounce around while animating. If anyone knows of an easier way to do things like this please let me know!

One of the Fifty-Two Yoda images I edited to make him Talk

Once I got those all the way I thought I wanted them, I finally fired up the next video to learn what to do with them. The files they included for download for the Crystal Ball animation included an XML file that I recreated for my yoda animation. I did that and followed the instructions for actually coding in the animation, and was greeted with the following:

Error message

My App has Stopped

That is pretty much where I am right now. I’m currently going over what little debugging I know to try and find the cause.

Advertisements

3 thoughts on “Code Monkey Tries to Animate

  1. I discovered David’s batch processor a while back as well. Is pretty awesome although the installer doesn’t work with Windows 8 so I have to manually install it.

    Did you check the log files to see what the error was?

    • I did check the error. I’m really not good at reading them yet, at all. I said something about too large and memory full so I reduced the file size. A few times. With no success. I decided maybe I had too many frames in my animation and reduced it from 52 to 22 and that worked. It doesn’t look as good, but it works.

      • I’m currently working through a memory problem right now in my app that is probably similar. It will probably take me a few hours to solve but if you are using Bitmaps there may be a way to scale it. Also, it depends on if you are destroying the object after you use it. If you aren’t, then even after the image plays, it sucks up memory (this is also known as a memory leak).

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s