Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Well i'm not entirely sure how to manage animations. I've looked at a few solutions, havok and ue4, which seem to use state machines but the states and their interactions are created using external tools with some really nice debugging features. Obviously i don't have the resources to build something that complex. So i was wondering how to manage animations and their states in code without creating a bunch of spaghetti.

share|improve this question

closed as too broad by Josh Petrie Jul 1 at 3:34

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

1 Answer 1

Well since you spaghetti so kindly, I personally use an enumeration for which animation state the character is in. The states I use for a 2D platformer are simply RUN, IDLE, JUMP_RISE, and JUMP_FALL. Each animation state corresponds with a set of 8 sprites, which are loaded to my camera function, which changes what the player looks like on screen. Are you looking more specifically at 2D animations or 3D? Both function on essentially the same principles, but you may require a 3rd party program for 3D animations depending on your skill level.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.