Character animation specification problems

Started by
3 comments, last by cairnswm 19 years, 4 months ago
Okay, here is the deal. I'm making an isometric tile game. For the character animation, I'm just using .bmp images with anything not the character being blended out. I'm using 32-bit 8A8R8G8B right now. I could always switch to 16-bit if I had to, but anyways here is the problem I'm having. Each character will have various animations and poses. I am trying to conserve memory space. Anyways, I figured out that they legs only need three animations (walking, standing and dying), so I seperated the leg animations from the torso animations. Then the torso animations have various animations (stationary, Hand Attack, Forward Attack, Overhead Attack, Gun Attack, Pain, Death, Splatter). I wanted each characters entire animation to be put on a single image. I'm trying to use it like keyframe animations. For instance, the first six frames might be a walking animation. When I had it to where the I thought the animation would be smooth (pretty high number of frames) the image dimensions were freaking huge. It also took up alot of space in memory. So I cut them down until the image would be an acceptable size (when I cut it down it became 2MB for the torso animations and 1MB for the legs for a total of 3MB this way. If I had drawn the legs and torso together it would have been 4MB total). Anyways, I have like three frames set up for the attacks, six for walking and things like that. It seems too low and like it will run choppy. What do you think are the least number of frames I could get away with without looking choppy for each animation? How do I figure this out without making my artists make freaking dozens of images with differing numbers of frames? If I do get it smooth, and it's still pretty large, how much memory do you think I should use for the characters and how much should I conserve for the tiles? I have to set some kind of limit, and I'm not sure how I can go about doing that. What is the maximimum you would use for drawing textures? Would you use a different method than this? Thanks.
Advertisement
If you don't need the extra colors and don't mind the bit shifting that's needed for 16-bit then I think 16-bit's a good idea.

Is the sprite animation drawn both facing left and right? If the left and right animation is quite similar maybe you could have only the animation facing for example right in the bitmap and then mirror it when it is being drawn on the screen surface. If you're using a graphics library probably there's some method that can do this or if you're using your own you could just reverse the order the pixels are being transferred.

Using this, if your sprite can be displayed in four directions you could decrease the memory size to 3/4. If it can be displayed in 2 directions you could decrease the memory size by 1/2.

How are the different frames placed in the bitmap? Do they all have the same size? If they have the same size it gets easier to place them when they're to be drawn but it often make a large area in the bitmap which only has the color to be invisible (by a colorkey or mask or similar). This area can be reduced a lot by placing the different frames as tight as possible, but then an array with offset coordinates for each frame will be needed so you know where to draw for example one torso frame compared to the character's coordinate.

I think 6 frames for the running legs is ok when using display mode 320 * 240 and about 8 for 640 * 480. It depends on how the animation is drawn though. Maybe you could decide a minimum distance in pixels a part of the character is allowed to move between two frames.

\Jimmy H
Quote:Original post by Jimmy H
If you don't need the extra colors and don't mind the bit shifting that's needed for 16-bit then I think 16-bit's a good idea.


I'm starting to think that as well. Make the images half the size.

Quote:Is the sprite animation drawn both facing left and right? If the left and right animation is quite similar maybe you could have only the animation facing for example right in the bitmap and then mirror it when it is being drawn on the screen surface. If you're using a graphics library probably there's some method that can do this or if you're using your own you could just reverse the order the pixels are being transferred.


You can move in eight directions, but I only need 5. I have it set up like this:

1. For facing up
2. For facing down
3. For facing right (draw backwards for left)
4. For facing Horizontally up and right (draw backwards for horizontally up and left)
5. For facing Horizontally down and right (draw backwards for horizontally down and left)

Quote:How are the different frames placed in the bitmap? Do they all have the same size?


Yes. They are all 64x64.

Quote:If they have the same size it gets easier to place them when they're to be drawn but it often make a large area in the bitmap which only has the color to be invisible (by a colorkey or mask or similar). This area can be reduced a lot by placing the different frames as tight as possible, but then an array with offset coordinates for each frame will be needed so you know where to draw for example one torso frame compared to the character's coordinate.


Didn't think of that. That might be a good idea. I'm not going to have much space though, so I don't know if it's feasible.

Quote:I think 6 frames for the running legs is ok when using display mode 320 * 240 and about 8 for 640 * 480. It depends on how the animation is drawn though. Maybe you could decide a minimum distance in pixels a part of the character is allowed to move between two frames.

\Jimmy H


Heh. I was planning on most computer being in a 1024x768 resolution or higher. The characters will appear smaller so I don't know how much this will affect it. Anyways, thanks for your help. I guess I'll just have to experiment and see what I can find out.
Quote:Original post by xg0blin
Quote:I think 6 frames for the running legs is ok when using display mode 320 * 240 and about 8 for 640 * 480. It depends on how the animation is drawn though. Maybe you could decide a minimum distance in pixels a part of the character is allowed to move between two frames.

\Jimmy H


Heh. I was planning on most computer being in a 1024x768 resolution or higher. The characters will appear smaller so I don't know how much this will affect it. Anyways, thanks for your help. I guess I'll just have to experiment and see what I can find out.

Don't worry about it, I'm one of those who likes to run the fullscreen low-low-res mode :). I think most people prefers 1024x768 though.

[Edited by - Dim_Yimma_H on May 24, 2009 4:22:38 AM]
I find that 256 colors (8bits) are enough to store most sprites. The 256 colors could all be shades of green for a specific figure but saving into 8 bit saves a lot of space. This is even better if you are using small sprites on hiugh resolution as the color distinction is even easier to hide.

This topic is closed to new replies.

Advertisement