I need hint regarding customization of 2d character. User should be able to choose different dress, face expressions for character.
I saw Blogs recent news | Game Developer link but not much helpful. Things have not explained properly there.
I have separate images for character’s face and body i.e. there are 12 faces and 11 bodies overall. If user chooses one head, it should be combined with any body.
First idea that came into my mind was to create skeleton for character i.e. create fixed points for face and body. I could replace any of them. For this, I have to keep face and body separate (two gameobjects) . But in this scenario, I faced issues in running animation - it was not giving a real look.
Second idea is to combine both face and body i.e. face and body chosen by user will be presented as single image (single gameobject) to user. It gives perfect look + animation, but headache is increased here. Since images have to be created for every face + body combination. So I have to manage prefabs for each combination. There will be pre-made images having head and body already combined as user chose.
Last one is vague algorithm in my mind, for I am not sure myself since this is my first game in unity.
What approach does unity game developers usually take for this type of scenario? Please help me with suggestions. I hope I am clear. Thank you.
I’m curious why method #1 is not working for you. If you make a character body (for example) the main GameObject, and the head - its child, the head will follow the body and movement should be ok. If the head has animation it can also be synchronized.
Combining two images in one automatically is quite possible in Unity, but combining their animation is probably not an easy task. So I would try to get the method #1 working.
The #1 method can only work if the character have only basic movements, in this case, sprites can animate each others correctly. But in other case, where there is complexe animation, you right Anni2D, you have to create skeleton, i recommand Spine for Unity
Or you can use Puppet 2D for skeleton animations. We used it and it works great. it’s not an external software, but a plugin integrated into Unity. I find it much easier to use than other softwares that do the same thing.
For sprite animations, a good tool i found is Spriter. There you can make a sprite animation for each body part, then just change the sprite (instead of a basic head, use a head with a helmet) and the animation will be the same, then export it. The problem is, if you have many items, this method can generate quite a lot of sprites you have to load the memory with.