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?

3 Answers
3

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.

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.

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.