Thursday, March 1, 2012

W.U. 0x14



This week I again late with post one day :] but yesterday I worked to late and on end I just go sleep.

So on what I worked so hard? I changed my character animation manager. Before I had almost all information about animations wrote in code :] but this was stupid solution. My character class looked like big hack for this game. Any slightly change needed recompilation, I couldn't good control of animations and other problems like that.

Right now I created system that allow me to overcome most of this problems. I have scripts which define how should animations be played in given situation. Bellow you can see example script:

if (on_ground == 1)
{
    if (speed >= 0.1)
    {
        play("Run", true)
    }
    elif (speed >= 0.04)
    {
         play("Walk", true)
    }
    else
    {
        play("Stand", true)
    }
  }
  else
  {
        play("Jump", true)
  }

I'm still not satisfy with its actual state and for sure I will do another revisions of its code in meantime of work. But for now I don't have any great idea how to change it.


And thats all for today, so till next week :]

No comments:

Post a Comment