Change Contents of the Bubble
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Questions on HW6.5-Spring2006

Got those questions about how to make circular linked lists and animating characters?

Ask 'em here!

How smooth does the "walk" animation have to be? Right now I using 2 images in my list and it looks kinda funny.

How do we turn in this assignment?

Go ahead and turn it in via WebCT. (He posts sheepishly, after quickly dashing over to WebCT to create the assignment...:-) Mark Guzdial

Can you tell me where I could find some good images to make a walking animation, or do I have to photoshop them myself?
There are some in the MediaSources, but even Windows Paint should be able to do this. Mark Guzdial

Well, if you want to use something premade, do a google search for video game sprites.
There's about a billion websites out there where people rip images from 2D games and post them.
But if you don't use sprites from a video game, the easiest way is definitely to make some...
Recall how jerky the Frankenstein (Bratz) doll animation from class was; it's really hard to get pictures in enough poses to make an animation...

Do gif images not work in Java? I keep getting errors about it not being able to load the files.
Yes and no. Some GIF images should load into a Picture object. In general, yes, Java can read GIFs, but we made the Picture class so that it works with JPEG primarily. Mark Guzdial

nope. :(
I mean, I'm sure they do, but we don't know how...
I assume you're loading the images as Picture objects, right? I ran into this about 2 weeks ago, doing much the same...
Turns out, the Picture class they've given us only knows about jpg files... I think.

Anticipating a followup, if you're on a pc, you may want to take a look at
It's free, and can convert large bunches of images between formats really easily. So if you need to make those gif's into jpgs, it definitely helped me...
On Macs, I love GraphicConverter. On Windows, I tend to use HyperSnap – it does screenshots, but it also works as a simple image converter. Mark Guzdial

I tried irfanview and it did convert the gifs into jpgs, but they still don't load for some reason. I checked the folder I put them in and they are there. The background I used loads just fine from the same folder, so it's not a location issue. Did you happen to save it as a certain type of jpg? Some save options came up when I converted them, but didn't know what they meant......

I can't get the walk animation to show up as an animation. I think the problem might be that I have a show method and I have a "" line in the walk method. I can get the starting frame to open with show(), but I can't get anything to happen in walk(). Any suggestions?

I have a similar problem. My walk method works, but I don't actually see any visuals.

Um...maybe you want to write "this.draw" instead of ""? Show just brings up a visual, but won't make the frames for you. Try that

Do you need a show method? I thought as long as the WalkingCharacter class creates picture frames, it would understand how to show them.

How do you get the animation to work? Do you need a play method somewhere?

You need a show method because the assignment indicates that Manabu will use one.
I don't know why you'd want ""– Manabu will call show, so all you need is a show method that shows the FrameSequence (, for example)
Even though the WalkingCharacter creates picture frames, it doesn't know how to show them. Note that you're putting them into a FrameSequence, and the FrameSequence knows how to show.

So, your walk method should loop some number of steps, where for each step, it moves itself a bit and draws its current charnode. Since CharNode is a cyclic linked list, you can just keep setting current to current.getNext() at the end of your loop. Thus, the current CharNode is just a position of the character. And your draw adds the picture it has just drawn to the FrameSequence.

Since Manabu will call (and your WalkingCharacter's show method shows its FrameSequence), the animation will be displayed as frames are added.
I hope that answers at least one of those questions...

How do you save the movie to your hard drive?

The frames are put in whatever directory you passed into FrameSequence.
You'll need some extra software to put it them together...
I used Adobe Premiere (ick). But I think virtually any video making software will let you import all of the frames and export a movie...

Link to this Page