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.

I know how I can make my character move by changing animation-frames. What if I want to use a weapon database? I want the character to fight with a bow and sometimes with an axe (different moves). Do I need like many pictures/animations for every different kind of weapon (bows, swords)? Or am I totally wrong?

share|improve this question
3  
Poor grammar doesn't hurt as much as using "u" and "sry". –  dreta Jul 24 '12 at 7:50
add comment

3 Answers 3

up vote 1 down vote accepted

There are multiple ways to do this. The simplest but also the least flexible way would be to render the character with every weapon with every move... As you want to change weapons, you would have to create stand, walk, run and jump animations for every weapon type.

Another way is to split the character into multiple parts, that can be rendered seperately. You would still have to use multiple images for animation, but if you do it right, you can make it quiet modular.

For example, you could have one sprite, that represents a human (2d, side view) without its arm. Instead of just drawing a weapon sprite, the weapon sprite also includes the arm (so the arm can be repositioned per weapon). You could also split it in three sprites, body, arm, weapon. Like that you could define multiple arm types (or arm layouts) and make sure that every weapon has one arm layout, it looks good.

another often used way to animate 2d characters is to make the characters out of multiple parts and then create a skeleton, that is animated.

A page showing a nice example of sprite vs skeleton: http://www.catalinzima.com/2011/06/2d-skeletal-animations/

Skeletal animation is also often used in 2d shoot em ups for bosses, that are large and have multiple parts.

Also take a look at shank. As far as I know, it is done with a mix of skeletal and frame based animation. The parts of the humans are skeletal based, but if needed they also play an animation, or change the sprite of a body part etc.

http://www.youtube.com/watch?v=h1u8UsBHM6k

Basically, frame based animation is much simpler, but with skeleton based animation you get much smoother visuals, if done right.

share|improve this answer
add comment

Yes. You need to model movements of your character for different types of weapons. You can reuse the movements when two weapons are of similar type (who'll notice the slight difference between firing a beretta and a glock?), but it's impossible to have your character move the same way when he's swinging a short sword or a halberd.

share|improve this answer
add comment

If you're using 2D sprites, you will need different pictures of every type of move your character can do. Later, you can draw the weapon from another sprite sheet on top of your character's sprite.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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