AuthorTopic: GR#176 - Running Knightman - Animation  (Read 5004 times)

Offline IvanX

  • 0001
  • *
  • Posts: 76
  • Karma: +0/-0
  • Blink Blink
    • View Profile

GR#176 - Running Knightman - Animation

on: March 16, 2014, 04:55:12 am


So animations are hard and I have no idea how this works.
Any C+C wold be appreciated

Offline yaomon17

  • 0011
  • **
  • Posts: 660
  • Karma: +0/-0
    • YaomonKS
    • taiya.sun
    • http://pixeljoint.com/p/28472.htm
    • yaomon17
    • valedev
    • playvale
    • View Profile
    • portfolio

Re: Running knightman

Reply #1 on: March 16, 2014, 06:16:04 am
He looks more like he is angrily strutting. I think he should lean forward and bit more and have his legs extend all the way out at the extreme frames. Try to go for the cliche "infinity symbol" run with his feet and work off from there.

Offline d13f00l

  • 0001
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile

Re: Running knightman

Reply #2 on: March 16, 2014, 06:55:33 am
So animations are hard and I have no idea how this works.
Any C+C wold be appreciated

Hmm?
You could have a data structure to define your x\y\w\h in your sprite-sheet.  Then, for an actual animation, you can use a vector, map, or linked list to have a list of frames.
The easiest thing to do, if each frame is the same length, is to make note of when an animation starts and base the current frame off that

Then do framenum = ((currentTime - startTime) / timePerFrame) % totalNumberOfFrames
I...think this works?  It's been a while since I wrote my own animation code.

let's say you're 500 ms into an animation that has 5 frames at 20ms each.

((5000-4500) / 20) % 5
25 % 5 = 0
You're on frame 0 of 4 at the current point in time.

How about 750ms in?
((10000 - 9350) / 20) % 5
37 % 5 = 2
frame 2 of 4

789 ms?
(10000-9210) / 20) % 5
39 % 5
frame 4 of 4


Seems to work.

Or just use some library or engine that does animations for you.

Edit:  Haha, C+C != C++.  I'd say that's more of a brisk walk, and it looks pretty good for a brisk walk.  To run, he's gotta lean forward.
« Last Edit: March 16, 2014, 01:29:57 pm by d13f00l »

Offline PixelPiledriver

  • 0011
  • **
  • Posts: 997
  • Karma: +6/-0
  • Yo!
    • View Profile
    • My Blog

Re: Running knightman

Reply #3 on: March 16, 2014, 07:49:38 pm
The main thing missing is that for a basic run there is point where neither foot is in contact with the ground.
During a walk there is always at least one foot on the ground.
So what you have looks like a power walk.

Go outside and run around ----> no seriously.
Think about what it feels like.
Now power walk.
Think about what it feels like.
Why are they different?
Look up some videos.
Draw some stuff.

Here's a really quick edit.


Sorry, no time to edit drawings.
All I did was edit position.

Other things could be improved as well.
With the contact starting frame that you have his foot slides forward while on the ground.
I was able to remedy this by moving him off the ground, but it's not really an intentional solution.
You would have to change some of the drawings to better match the action at the current time.
« Last Edit: March 19, 2014, 03:52:58 am by PixelPiledriver »
And knowing that it is, we seek what it is... ~ Aristotle, Posterior Analytics, Chapter 1

Offline IvanX

  • 0001
  • *
  • Posts: 76
  • Karma: +0/-0
  • Blink Blink
    • View Profile

Re: Running knightman

Reply #4 on: March 18, 2014, 11:45:36 pm


So I pushed his torso forward to eliminate the power walk look of things, but I'm still not content with the legs.
Something about the extremes and the frame before them seem off, but I can't figure out what looks so off about them.\

Also, sorry about responding late.
Work and dark souls have been eating up my time.

Offline yaomon17

  • 0011
  • **
  • Posts: 660
  • Karma: +0/-0
    • YaomonKS
    • taiya.sun
    • http://pixeljoint.com/p/28472.htm
    • yaomon17
    • valedev
    • playvale
    • View Profile
    • portfolio

Re: Running knightman

Reply #5 on: March 19, 2014, 02:41:18 am

This was the frame the PPD added in.

This is an old run anim reference.
I think the main issue with the knight looking like he is power walking is that he is too grounded. He needs to bob up and down a bit more and really kick up at the extremes of the run.

Offline IvanX

  • 0001
  • *
  • Posts: 76
  • Karma: +0/-0
  • Blink Blink
    • View Profile

Re: Running knightman

Reply #6 on: March 21, 2014, 04:56:58 am


So at this point, I've reworked the extremes and added in 2 tweening sprites to smooth things out. I'm thinking it's good enough to start adding in details and whatnot, but any critique before I jump into that would be nice.  :)

Offline cels

  • 0010
  • *
  • Posts: 258
  • Karma: +1/-0
    • View Profile

Re: Running knightman

Reply #7 on: March 21, 2014, 07:48:05 am
I think your mistake in the latest version is extending his legs so much. It's like he's leaping forward 2 meters at a time, almost doing the splits with every step. PixelPiledriver's version looked more like a person running with heavy armour, as it had smaller steps and more vertical movement.

Offline IvanX

  • 0001
  • *
  • Posts: 76
  • Karma: +0/-0
  • Blink Blink
    • View Profile

Re: Running knightman

Reply #8 on: March 21, 2014, 11:03:32 am
I had to step away from this for a while. It seems I was handling this all the wrong way and trying to add in more frames for more smoothness.


I dropped a few frames that weren't doing me any favors, including the  extremes, since the frame right before them served as a better extreme.
« Last Edit: March 21, 2014, 11:05:26 am by IvanX »

Offline r1k

  • 0010
  • *
  • Posts: 270
  • Karma: +0/-0
    • View Profile

Re: Running knightman

Reply #9 on: March 21, 2014, 09:44:25 pm
I think that looks better but I think he should have more weight in his steps, given that hes wearing a suit of armor.  I tried making an edit, but honestly I have trouble giving my animations weight too