2012-11-13

Animations of Dragontorc (2)

I described some bits of animation system in Dragontorc already. That's why I will just focus on new things that were added since then. I might miss some things and I am starting to consider creating a wiki page to keep all details there. It will also work as a documentation for modders. But now, I will just shortly describe bits that I remember, in random order.

First I want to settle between 2D, 3D etc. I probably already did that but I this is also good place to mention in. I want Dragontorc to be done in 2D without any 3D stuff and actually without anything fancy - as far as I want to go with effects are alpha blends. This limits me a little but also focuses on particular things.

Anchors
Anchors are named points for any object. These points may have different functionality. "Point of attachment for held objects", "Point from where projectiles fly", "Point at which particular particle effect is played". At the moment they are used (in code, I had no need to do that for current characters) only for projectiles' starting position, but I want to add "held" anchor.

Animation moods
Mood is used to determine which custom animation should be played. Currently different parts of animation tree may force their own mood and when custom animation is requested, it will be chosen from few. Similary death animation might be chosen basing on particular mood.

Events
I try to keep things clean and to work with flow that AI orders gameplay systems to do something, for example action handler, action handler orders animation system to play animation, animation triggers event that goes up to action handler, that does stuff that affects other entities in the world. That's why I try to avoid AI doing anything that could be considered as physical activity. And that's why I like animations to do some physical stuff or at least to be physical instigator to it. What do I mean by that? Well, I don't want to adjust timing in AI when I want to do damage at particular time in animation. I don't even want to know what animation will be played. I just want to order animation to be played, other system will choose right animation and animation will know when to trigger something. And how it will trigger it? With events.

Limiting movement
Another thing I like to keep clean. Movement. It is up to animation to decide if it is appropriate or even possible to move at given time and what is possible. Movement module may order to move in any particular direction but animations may limit movement to be possible only forward or not possible at all. Or character should not rotate or should rotate at constant rate.

Movement styles
This is related more to movement itself but might be considered as part of Animation. With movement styles it is easy to affect path and speed of movement. Character may then look as it is drunk or is walking not on straight line.

Playback rate adjustment
Depending on current speed playback rate of animations changes, so if character moves faster, it will move its legs quicker.

State machine decision rules
I added also some new decision rules for state machines. They check movement styles, requested direction (in relation to current direction or movement or requested direction of movement) and few others.

This is short and not definite list of changes for animations. And it turned out when I was adding items, that it is in alphabetical order (with one exception, I decided to add Movement styles after I finished the list).

And now I am sure that I will have to create wiki page for all of this, as this is just mentioning of features but they will require clarification and examples of use (and someone to correct all my grammar and vocabular errors, and to be honest, my grammar isn't much better in my mother tongue, even my wife sometimes makes fun of me because of that).

No comments:

Post a Comment