1
\$\begingroup\$

I wonder which technique is used to render 2D RPG character with different armor pieces and weapons.

E.g. character can equip different chest armors, gloves, boots and helmets. They also can equip different weapons with different move sets (e.g. greataxe, sword, dagger).

Should I render every armor piece separately and also provide frames for different move sets in texture atlas of an armor piece? Or is there a better approach?

\$\endgroup\$
5
  • \$\begingroup\$ Your approach seems sound. Or can you see any potential sprites/data duplication issues with it? \$\endgroup\$
    – Kromster
    Commented May 13 at 9:45
  • \$\begingroup\$ @Kromster it just looks to me like a brute force solution, since an artist should create many different frames for each armor piece. I wonder, if there is any "smart" approach to this (like skeletal animation in 3D games, which allows to generate different animations) \$\endgroup\$
    – Steyrix
    Commented May 13 at 9:48
  • \$\begingroup\$ Ah, your main question is about the automation! So basically you have a character (or several), animations and rigs for equipment. Then it's just a matter of automating the process of dressing each character in the right equipment and running the allowed animations and exporting that into sprites (packed into atlases). \$\endgroup\$
    – Kromster
    Commented May 13 at 9:50
  • 1
    \$\begingroup\$ 2D games can also use skeletal animation. Mark of the Ninja and Lovers in a Dangerous Spacetime both do this. Check out software packages like Spine 2D or Puppet2D for examples of the workflow. Similar tech is built into game engines like Unity too, along with features to dynamically swap individual sprites so you don't have to pre-render every permutation as Kromster suggests. The exact steps to take will depend on what engine/tech you're using and what your target visual style looks like. \$\endgroup\$
    – DMGregory
    Commented May 13 at 9:55
  • \$\begingroup\$ You can create the equipment as a 3D component(if it is a 3D game) or a 2D sprite. Then, put a arrow or other invisible component to your character file. Then, use code to make the item you want to attached attach to the component. To remove it, just code it to delete it \$\endgroup\$ Commented May 13 at 11:40

1 Answer 1

1
\$\begingroup\$

The following assumes you are going full sprite atlas based 2D.

To compose a particular armor on a sprite you could render the armor separately on top of the character that means you duplicate the poses for each armor piece and render it again, swapping armor then means swapping out that section of the pose atlas.

Or have the sprite sheet instead be a set of uv coordinates that reference the pallet for the character. That way you can for example swap out just the armor section of the pallet for that character. There's a bit of mess to deal with armors variants that cover more or less than the standard but that should be manageble if you do use a layer system.

Moveset will require separate animation for each move. If you and your artist are creative you will be able to reuse poses a lot. Especially if you are going for the 16-bit-era retro feel.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .