Dev Blog 6: Attack Animation

Things have been progressing slowly this month. I wanted to post something earlier but have found it difficult to come up with anything interesting to show.  Mostly, I've been busy with the day job and life and so that would be the key reason that I haven't had much to show.  This did however lead me to want to work harder on the project so that I could actually get something to write about.  But in the end I actually have been stuck a bit and so there hasn't been that much useful output.  


Particularly, I've been working on some main mechanics such as combat and movement.  It takes a lot of time for me to draw and I've been trying to get Matthew's sprites correct so that future characters and enemies aren't done incorrectly.  I have been trying to get a good attack animation done that will visibly show the player which spaces they will hit when they swing a sword for example.  My first couple attempts didn't have the character move his limbs correct and it looked rather goofy.  I cleaned that up somewhat but still felt the attack area was not as defined as it needed to become.  So I tried doing sword swooshes to fill in the space, but that also looked bad.  


I looked over how some classic games did there attack animations and swiping effects and found a couple things.  Firstly, the swoosh size varied from game to game, but most games of this style used a thinner curved line.  They also often didn't include it on every frame.  The second useful bit of information I noted was that the animations didn't typically hold on each frame equally.  Meaning, as the player swipes their sword clockwise from 3 o' clock to 9 o' clock, they may hold longer on 3, 6, and 9 and may spend as little as one frame on 4, 5, 7, and 8.  So using these tidbits of information I chose to do a similar approach.  I also found that simply speeding up my animation made it look much better.  I went back and saw even more issues with the sprites animation and didn't feel totally happy with it, but I figure I should move on and do the other directions and eventually work on something new.

Lastly, I attempted to do some actual game effects while working on the animation. I thought that I could procedurally create the swoosh trail of the weapon using particles or shaders.  I looked into how this would be done in Unity and found some basic examples.  I did get it partially into my game and then proceeded to write a system that would be useful for adding effects to game objects as needed.  I never got my effect to look correct though.  I have some sort of issue with positioning during the animation that I can't seem to get correct.  I also simply don't want to waste more time screwing around with it.  I haven't given up hope yet, but it was a good reminder that I shouldn't be spending a ton of time on fluff when I need to get basics in place to see if they actually work.  I'm certain I'll want to include some form of effect so that the game doesn't look like it came straight out of rpg maker, but at this point I don't even know what I want or what the best way to do a system would be.