How to design animation in objects/characters

Started by
1 comment, last by GameDev.net 19 years, 7 months ago
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.
K'-P = ME
Advertisement
Have all of the needed animations in one set, and then just use the certain sets when the character is meant to be doing something.
ie frames: 0-16 walking
16-25 jumping
26-40 getting shot etc
Hope this helps.
____________________________________________________________Programmers Resource Central
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.

This topic is closed to new replies.

Advertisement