So currently I am toying with some ideas, and I basically want to have the notion of equipment on the character, now currently I have the following workflow:
- Create body spritesheets with animations
- human_male_idle_1.png
- human_male_walking_right.png
- orc_female_idle_2.png
- etc
- Create Helmet spritesheets with animation
- human_male_leather_helmet_idle_1.png
- orc_female_leather_helmet_idle_2.png
- etc
- Continue for other armour pieces for each body type
- Import all bodies into one sprite collection
- Import all equipment into another sprite colleciton
- Create animation for each object matching animation names with body
- human_male_animations
- human_male_leather_helmet_animations
- orc_female_leather_chest_animations
- Create body prefab for race/gender
- Add child entities on prefab for helmet, chest, pants
- When body type animates, it ripples same animation command down to children (i.e everything will play idle_1 animation)
So that then would define the base naked bodies without any armour (they would have loincloths or something), then as you can equip helmets, pants and chest pieces I would then need to make armour animation spritesheets to overlay on top of the given person.
So as far as the player can tell it just looks like 1 person, but its actually a body with overlayed sprites which all have the same animations, so when the player is idling, the body and all child items beneath are idling too, so all animations should match.
Now it works, but it feels a little heavy handed and I am sure this is a common sort of use case, so was wondering if there was a better way to handle these sorts of use cases, as currently EVERYTHING has to have same animation names (idle, idle_1, walking_right, walking_left, running_right etc) but that means that everything has to be its own animation file so the names dont conflict.
Here is an example of what I mean by layering, although this would just be body, entire armour, right hand item, left hand item.
http://gyazo.com/b2d771f3a4f98822902bcf010430784bSo anyone else done anything similar or any recommendations on how to best use tk2ds functionality to simplify stuff here?