Jump to content
  • Advertisement
Sign in to follow this  
DragonXXIV

Help Needed, File Compression

This topic is 4818 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, I'm a newb to all programming and this may be better off in the beginers section, but I don't think that it will recieve the right kind of help there. I don't even know if this is the right place, so don't flame me please. NOTE: I'm programming this game in Java. Anyway, on to the question. I have thought up a great idea for a battle system in the RPG I am making. Basically the whole thing will be cinematic; you select a technique and instead of your character doing a simple attack like in most RPGs it does a whole animation. Now, here is where the problem arises. The amount of animations (if prerendered) will obviously take up a lot of space, but I need them to fit on 2 normal disks. I can up it to 4 max but I want to try to keep it at 2. So, is there a way to compress these animations down to an extremely small size, while still being able to uncompress and play them instantaneously or at least really, really fast. Or, is there another way to do this while still keeping it 2d. I DO NOT need an exact method, I just need to know if it's possible or if I should give up and try something else. Thanks in advance. [Edited by - DragonXXIV on September 4, 2005 5:57:29 PM]

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Some ideas:

-Vector based graphics

-Make up characters from common parts then just keep track of rotations, translations, etc. So it's just raw text not actual graphics. This way you'll just need background images and then compose a character of arms, legs, torso, head and then animated them accordingly.

Well hope that helps, thought I had a 3rd idea but it flew the coup.

Share this post


Link to post
Share on other sites
Well, how would the second one work? Perhaps I didn't make it clear but the camera will move during each attack, meaning you will have to see each character from all angles. If that's true then how do you animate accordingly? If I can I will but I don't think that can be done in 2D.

As for vector based graphics, that would mean making the animations frame by frame. I was hoping to make them as prerendered 3D animations. Or am I missing something?

Thanks for the help.

Share this post


Link to post
Share on other sites
usually the entire character animation is stored in one bitmap file partitioned into an array of pictures. this is a big win when it comes to reading the file overhead, also if you're using palatte this leads to substancial savings. another way to save when using palette is to have only two palette, one for your sprites and another for your background layers, this is the way old console system like nintendo, implimentated it. in fact, nintendo used even more hacks to build a sprite, strictly for saving space. you may want to read up on their technique, the problem with it is that the palettes are only 16 colors lol. my only advice is clever paletting, don't use a plaette for each image, use paletes for bundles of images(animations). I'm not sure just how many colors you want for your game, but 256 for each character is pleanty I'd think. you could use 16k palettes you'd still save space and have pleanty of colors if your game uses highly rich graphics. obviously use some sort of compression when you're done, like lzw or something and can be reasonably well tuned, I'd stay away from losey compression like jpg as this leads artifacts in your art, which is I believe is inappropriate for sprites.

Share this post


Link to post
Share on other sites
oops I didn't fully read your post either. you can't make this 2d unless you have only a limited set of angles, the more angles the more unrealistic a 2d approach becomes. if you're forced to 3d, one way to reduce the size of an animation is by using "channels" for your dof, instead of an array of poses(models) like 2d animation in 3d, you have a single model, and the animation is defined by a sequence of DOF for each angle. this method is takes up more processing time, but is more general, and takes up less space on the disk.

there are image processing algorithms that try to interpolate a 3d viewpoint form a sequence of 2d images, but as I understand it these are reasonably computationally expensive, this kinds stuff was used to used in the movie matrix for rotating slowmotion views.


as al bundy would say, you're not a 6!!!!! trying to put reasonable 3d animation on 2 floppy is a challenge to say the least. hopefully others have more insightfull comments for you.

Tim

Share this post


Link to post
Share on other sites
I see what you mean. 2D would be unrealistic if I tried to keep it in sprites. And as for 3D, I can't because the engine I'm using is 2d only.

However, the other way is the create a movie for each move. Allow me to explain.

I'll an animation play for every attack. Now, one may say that would mean there would be too many movies for every combination of monster/characters. However, I will have layers instead. Layer 1 will be the backround with the camera moving around. Layer 2 will be the character attacking. Layer 3 will be the monster being attacked. Layer will be etc.

Now, in doing this an extremely large amount of space will be taken up. If I can simply compress each file this would work perfectly. I just need to know if that is possible, or if I should try a different battle system.

Thanks for the help so far guys.

Share this post


Link to post
Share on other sites
it's interesting and it has been done before, but usually I think for single attack. the problem with the movie approach is when you go from say a hook to a kick you want a smooth transition that I think would be difficult with a move, unless after each move, the character went back to some standard pose. if there was only one attack per round this is easy. but it looks kinda weird if I do a round house, stand up to some nutral pose, then make a low punch. it would flow, but it doesn't look like a combo. it seems that this would be the main source of trouble?? if there was a single attack per round, it would be ok, but it seems you want to have customizable combos and stuff. hmm maybe you could have more then one nutral pose, like maybe 3 would work, every move would have 3 movies one starting at the nutral pose of the last move, and ending in a nutral pose that is more sutible for the move, for example, the end of a roundhouse, I'm alwas gonna go to the chrotching nutral pose. but my roundhouse can start from any of the 3 nutral poses(standing, duch, crouch) but it must end at an appropriate pose for the move(crouch) then if the next move was uppercut, you'd pick the uppercut animation that starts from the croutching pose, and all the uppercut animations of course end in the standing pose. but I'm just talking, I've never implimented this kind of system.

Tim

Share this post


Link to post
Share on other sites
Hmm...

That might work, but it wouldn't look good. I think I'm just going to go with making 'movie' for each technique/attack. I'll then compress the animations and uncompress them when the time comes.

However, this gives me two problems. 1.) I need to find the best, smallest size I can compress to, and 2.) I need to somehow 'reserve' space for the uncompressed files.

If anyone can tell me how to do that I would be very thankful.

Share this post


Link to post
Share on other sites
oh I was under the impression you were giving the user freedom to make new combos and from any permutation of attacks? if you just got a few fixed attack this is a different problem all together. makes it much simpler.

Share this post


Link to post
Share on other sites
No, I will only have animations for set combos. I still need to find a way to compress them though, so some help would be appreciated.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!