Jump to content
  • Advertisement
Sign in to follow this  
gabrielauditore

2D Articulated Animation

This topic is 2527 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys, does anyone know a good book / tutirial on how to make a 2d artuculated animation system?
I know it's avague question, but google turned up only graage results...

Share this post


Link to post
Share on other sites
Advertisement
Please tell us what language you what to do it in, I'm assuming that you what to do an animation in your game engine. If you are using C++ and SDL, then this tutorial might help you: http://lazyfoo.net/SDL_tutorials/lesson20/index.php, although you might have to look at some earlier tutorials depending on how much you know about the programming used in that tutorial.

If you are not using C++ and SDL, then I can tell you that the concept of that tutorial is that you have one big PNG file for a given object within the game. Every frame that you want to show is in that PNG file, then you clip the image into smaller images. When you want to show that object within the engine, you loop the different frames.
Let's say that you want to animate a flower, the flower has a width and height and you use those numbers to clip your image into smaller ones. You then assign a number to the frames in the form of a variable array. When you show the flower, you have to keep track of what frame it is on, how fast it should change frame and when to loop the animation and start on frame 1.

The reason that you clip your image into individual frames instead of having the frames in individual files is simply to minimize the amount of code that you have to write.

I hope this can help you. :)

Share this post


Link to post
Share on other sites
Hi, The Magical Pot

Thanks for the reply. I already have a pretty solid frame-based animation system in place. I'm looking for something that is articulated that is something with a skeleton and a hierarchy. The only tutorials i've been able to find are about 3D articulated animation, but i'd like to not use matrices. As far as programming language i'm working with C++ and rendering trough OpenGL, but the tutorial language doesn't matter, if there is something in javascript, ruby, c#, etc... i'll understand the code and be able to apply it.

Thanks guys

Share this post


Link to post
Share on other sites
There is no difference between 2d and 3d skeletal animation.

You never have to use matrices (in fact I think you should not, for interpolation reasons), as long as you can make the world matrix for each bone at the end.

Share this post


Link to post
Share on other sites
wolfscaptain,

Thanks for the reply that actually helped clear things up a lot.
There is one last piece of this puzzle that i'm still not fully grasping.

How could i go about setting an arbitrary rotation center for each node?
At this point i think i would actually need two matrices, one to be the generic transform and one to be the offset rotation... I can't really figure this one out.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!