Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


2d animation technique?

This topic is 5142 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

Im making a side scroller where the character is broken into 10 body parts (maybe 14 for hands and feet later), rather then using sprite frames im essentially looking for an effecient way to go about doing this by rotating each part of the body individually . I managed to get some pretty good looking running animations for the legs using a buffer (simply an array) of radians of rotation that was recalculated each time the buffer ran empty. This was turning out to be a lot of code in the main loop that i just didnt want, so now im planning to have a constant array of radians for each body part for each type of animation (ie. running, jumping) and an acompanying array of a radian delta's. Ive finished the function to rotate each piece and cycle through the frames (indexes of the arrays). But ive come to the conclusion that defining all these arrays is going to be a massive pain in the ass. Does anyone have a better way to do this, aside from some kind of animation program (or sprite frames). I should add that the parts are 'held' together through a function that relates the body to a x and y coord (screen cords) which represent the player, and all the pieces are related either to the body or to pieces that are related to the body (ie. forearm to large arm and largearm to body) using trig, so thats covered. edit: heh, i wonder if any of that is actually legible? [edited by - unliterate on May 25, 2004 8:32:16 PM] [edited by - unliterate on May 25, 2004 8:42:32 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!