Sign in to follow this  
Dark Metamorphosis

How to design animation in objects/characters

Recommended Posts

hi, I am using, vc++, directx 9.0, studio max 6 with a PandaSoftware xfile exporter. ok, so I know how to play animation, however, when dealing with a character, that can do a lot of stuff,( ex: walk, jump, run, shoot, sneak...), I am just unable to think of a system that handle all of this,(of course I tried some, but got messed up). so should I make one animation set, that have all of the animations. or one animations set per animation. and does any one know, why PandaSoftware xfile exporter always craches when exporting models with long animation. does anyone know of a good exporter (from studio max 6 to xfile). thanks a thousand.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I find that it is easier for me to have all of my animations separate. Each animation master class has an std::map of animations which can be referenced by name("Walk", "Run", "Attack" and so on). Animations are loaded from separate files. This way, I can more easily implement customized animation sets for different characters. For instance, one character might have "Walk", "Run", "Fly" and "Attack" animations, while another might have "Walk", "Run", "Dig", "ChopWood" animations.

If you organize your animation as all one set, perhaps in an array, then you need enumerations or some other method of describing what order the animations are in(index 0 is the Walk animation, index 1 is the Run animation, etc; different characters that can do different things would need different enumerations), and making customized animation sets becomes trickier, since not all objects have the same animations.

When constructing an animation master object, I simply give it a list of animations to load, and they are loaded and placed in the std::map, keyed on a given name or identifier. I code in a sane 'default' animation selection so that if an animation is requested that an object does not possess, the game will not crash or take a dump but will instead animate the object with a generic default animation that makes it obvious an incorrect animation was requested somewhere. (I use a bright orange, floating exclamation point for the default animation. [grin] ) Sure, 'indexing' an animation in a map rather than a static array is very slightly slower, but realistically it never becomes an issue and I appreciate the greater flexibility in putting animations together.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this