Post news RSS Dev Log #8: Player is now "controllable"

As I announced previous week, I've been working on the Animation controller of the main character.

Posted by on

These days I've been very busy on my previous project, Zombie Incident. Nintendo of Europe has approved it and I had to work on the marketing materials: trailer, banners, screens,...

This doesn't mean I've haven't advanced on Maria Akane!

As I announced previous week, I've been working on the Animation controller of the main character.

I created a decoupled component that examines flags (input) and changes from one state to another depending its predefined transitions. In fact, the animation controller is a class which manages several specific animation controllers, one per each animation "layer". The cool thing here is the way we manage these layers to provide animation feedback to the player.

For instance, if the player is walking, we see the animations in the Side Layer in action. The same applies when he is idle, crouch, crouch-walking, and jumping. But what happens if we attack? Instead of having to create an animation for attacking and walking, attacking and idle, and so on, we mix the Side Layer with the Attack Layer in a special way.

One of the coolest features is the blending between animations I've implemented for this system, which also blends the Attack Layer with the Side Layer when the attack animation finishes.

As I told on last post, I've used QFSM to design the animation controller. And after it's designed, I that data to generate c++ code! Sounds weird, doesn't it?

This is the state machine for the layer who manages the side animations. And this is part of the code it generates :

cpp code:
typedef struct
    char* m_szExpression;
    uint  m_uiFlagsValues;
    uint  m_uiFlagsMask;
    float m_fBlendTime;
static TTransitionData gsoTransitions[13] =
    // 1
        0 | ACV_WALK,
        0 | ACV_WALK,
    // 2
        0 | ACV_CROUCH,
        0 | ACV_CROUCH,
enum EAnimControllerState


    ACS_MAX_STATES = 0xffffffff
static int gsiStateTable[ACS_NUM_STATES*ACS_NUM_STATES] =

With this, player is now "controllable" so I can start developing other gameplay elements and mechanics.

Taking in consideration this has been a rather techical post, I've tried to be as brief as possible so... that's it!

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Dev Diary
Post news
97 (1 today)
Related Games
Maria Akane
Maria Akane Adventure
Related Groups
CoderChild Developer & Publisher