Possible Duplicate:
Which is the best approach to make a 2D character to be able to use tons of different equipments when in action?

I'm developing a 2d isometric game (typical Tolkien RPG) and wondering how to handle character/equipment combinations. So for example, the player wears leather boots with chain-mail and a wooden shield and a sword - but then picks up plate-armour instead of chain-mail.

I'm using Blender3D to create objects, environments and characters in 3D, then a script runs to render all 3D meshes into 2D orthographic tile maps. So I can use this script to create all the combinations of character equipment for me, but there would be an explosion in terms of the combinations required.

  • \$\begingroup\$ As you are pre-rendering everything... why worry how many combinations there are? If you do them in sets, you won't have to re-render everything every time, only subsets. This is dev-time stuff, I wouldn't sweat it. Just pick up a cheap second-hand PC or two to act as a little render farm, if you're solo. \$\endgroup\$
    – Engineer
    Commented Oct 28, 2012 at 14:18

1 Answer 1


Most 2d games solve this problem with the "paperdoll" technique.

You create a spriteset for the "naked" player character (you might want to add underwear to avoid nudity), and you create separate spritesets for all boots, shirts, pants, headgears etc. These equipment spritesets only contains the item itself, nothing else. When the player character is drawn, all the sprites are drawn on top of each other in a predetermined order.

So you first draw the naked character, then its boots over the naked sprite, then its pants, then its shirt and then its helmet.

When performance is a concern, you can optimize it by caching the appearance of all the sprites over each other until the equipment changes.

  • \$\begingroup\$ A good example is Hack, Slash, Crawl on Kongregate. \$\endgroup\$
    – Engineer
    Commented Oct 28, 2012 at 14:12
  • \$\begingroup\$ Doesn't Diablo 2 use this technique? \$\endgroup\$ Commented Oct 28, 2012 at 14:28
  • \$\begingroup\$ @Markus Yep, the game I mentioned is just a cheap Diablo clone :) \$\endgroup\$
    – Engineer
    Commented Oct 28, 2012 at 14:47
  • \$\begingroup\$ Some good answers here thanks. Can't quite get my head around the ordering though when it comes to the weapon rendering. If the character swings their weapon in such a way that their body obscures part of the weapon, the paperdoll technique would break wouldn't it? \$\endgroup\$
    – JimFing
    Commented Oct 28, 2012 at 14:53
  • 1
    \$\begingroup\$ @JimFang: You could solve that issue by having two weapon spritesets, one which is drawn before the base sprite (so it's behind everything else) and one which is drawn least (so it's drawn over everything). The first spriteset only contains the animation phases where the weapon is behind the character, the other only those where the weapon is in front. \$\endgroup\$
    – Philipp
    Commented Oct 28, 2012 at 16:39

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