I am currently creating a 2D fighting game and have implemented a system where upon starting a new game, the player is presented with the option to create a custom character. I have a set of string arrays set with values that correspond to hair, headgear, chest, lower body and shoes.

When done selecting a variety of items from the lists, a code is generated based off the index of each item (i.e 01123), which is then used to assign the correct Spritesheet to the player character.

This has already presented a lot of work as I have had to create quite a few spreadsheets based of possible combinations, but I am now looking at a massive amount of work to implement each variation.

I have started to look into setting layers for each item to reduce workload, but I am also looking at having different stances for the character - Depending on the currently equipped weapon - so this may present a lot of work either way.

My question is, do I have any alternatives or am I stuck creating masses of Spritesheets to cover all combinations?

As a side note, how much impact will assigning layered items have on overall performance?


1 Answer 1


You should be using layers.

That is you have a naked character sprite. On top of that you add layers for hair, armor, gear, weapons.

Depending on your actual game, you might do that in generic form, or split in parts or even add skeletal system.

For example in Diablo 2 character was split into parts that were combined:

enter image description here

Here's another example of similar approach:

enter image description here

  • \$\begingroup\$ Thanks for answering my question, with images too! :) I guess the performance impact is negligible then? \$\endgroup\$ Aug 21, 2014 at 9:46
  • \$\begingroup\$ Performance impact largely depends on how many layers you use and how many animations you have. Maybe you even switch to 2D skeletal animation, who knows .. \$\endgroup\$
    – Kromster
    Aug 21, 2014 at 9:53
  • \$\begingroup\$ @PatrickDeveloper you can prerender the finished sprite for when it's needed a lot (the standing position, walking animation,...) \$\endgroup\$ Aug 21, 2014 at 14:34

You must log in to answer this question.

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