2D skeletal animation?

Started by
15 comments, last by krez 19 years, 12 months ago
i am working on a 2D platformer/fighting game, and i am considering using a 2D skeletal animation technique for the characters. that is, each character would be made of several pieces that are connected to each other with joints, which can rotate and slide and such. i have a basic idea of how i am going to do this, but i am curious if anyone has done something like this, and if so do you have any pointers or gotchas?
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Advertisement
isn''t soldat using skeletal anims? it sure looks like it.

I don''t think there is anything particular with skeletal animations in 2D. It should be quite simple. a vector and a scalar angle

also, that would be quite useful if you want to do inverse kinematics (like have the arms and gun in hand follow the mouse pointer, and the feet follow the terrain slope).

Everything is better with Metal.

it would seem to me that even if it was a 2D game, you''de still need a 3D figure. Otherwise, they will look like paper dolls whose joints are fastened with brads. They would look kind of goofy since you would have no perspective, foreshortening, or anything remotely realistic. Of course, if it''s Paper Doll Fighter II, you might get away with it :-)
I considered doing something like this, too, although I was going to use springs and tension for a physically-realistic simulation.

The gotchas are mostly collision: think long and hard about how everything is going to work before you write a line of code, or you''ll go nuts.

Resist everyone
I am your only friend. Click here for more information. (MOVED)
Penguin Ninja!
pfft collision is easy, just use an equation to find the intersecting lines
quote:Original post by leiavoia
it would seem to me that even if it was a 2D game, you''de still need a 3D figure. Otherwise, they will look like paper dolls whose joints are fastened with brads. They would look kind of goofy since you would have no perspective, foreshortening, or anything remotely realistic.

yah i was thinking about that, but i haven''t reached a solution yet. i could just transform the parts in 3D, but then at certain angles they would look strange, or even disappear (if they are perpendicular to the screen). i must find a workaround for this, because i do not want to actually use 3D models.
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Hi
Castlevania serie of GBA uses this technique extensively. Look at the first moments in Castlevania: harmony of disonnance, where a enormous armor attacks you.
well, think about certain "moves". Let''s say you do a spinning backfist punch. How would you do the "spinning" part?
Sammy''s upcoming fighting game The Rumblefish uses this technique. Some people say it looks odd and does give you a paper doll effect.
I was toying with this idea as well a little while ago. I figured you''d need some sort of depth info just to make animations stable (otherwise you''d get the various parts flickering over others as they moved). A simple depth value per key frame (and interpolate between) should do it, then you can just sort your sprites on the depth and draw. Then you just create the animations with the appropriate shortening of limbs as they move.

This topic is closed to new replies.

Advertisement