Opinion on 2D customizable characters

Hi!

I’m making an art asset for unity and was curious about what best practice would be to deliver them - from a developers point of view.

What I’m making is a zelda-perspective 2D character that is fully customizable, so you can change clothing, hairs and all that. They are created in Spine and then converted in Unity’s animation, so it works like a skeleton animation and the sprites sitting on body parts can be swapped to change cloth.

The character comes with 4 objects, one for each direction. So it would basically mean you would switch them on and off depending on which direction you’re facing/walking (since they’re bone animations and graphics can’t just be recycled or inverted for up and down)

So what I’m curious about is your opinion how I should deliver this, how would you want ready to get an asset like this working.

Since, for an example, a shirt has many sprites (lower arm, upper arm, body, left and right), how could I make it convenient for the user? Would making an excel document work where I put all the sprites names in a cell under “Shirt”.
Or maybe a clear naming convention would be enough? So the ‘lower_arm_slot’ looks for a ‘shirt_lower_arm_side’ sprite.

Also note that it would need to switch for all the directions, so it would switch sprites in all the game objects.

How would you make a system that switched items on bone animated character?

What I’m afraid of is that it’s a big mess and the user doesn’t get any ideas how to implement it themselves, with so many sprites, and a deep bone hierarchy.

Hopefully, this made sense and someone could give some insight and opinion. Thanks!

Documentation should be available in a PDF at the very least. An example scene which lets you view all variations is considered a necessity. I haven’t looked closely at the different bone animation assets out there, but characters like that should be compatible with UT’s own Anima out of the box, any other SDKs you have access to if you feel like it.

I envision the ideal system like this:
Body parts are named with the pattern side_part_look_variation, so you’d have l_arm_blue_1 for left smurf arm type 1, or body_squamata_iron for a torso clad in Roman-style iron scale mail. Weapon naming should follow a similar system. Something descriptive enough that name collisions don’t happen very often.

The core skeleton should have mount points for different weapons, and I think different poses need to be made for different weapons. A two-hander would glue both hands together, of course. Some fighting animations for slashing, chopping, stabbing and defensive maneuvers would be required.

Switching bits: In a perfect world the player character would only need body part prefabs with lists of variation sprite mesh objects with a short keyword, and a script to switch out the style by keyword. Perhaps a custom object which holds all the different parts for a style that you could drop onto a list in the character object, which then automatically places the parts according to the bone structure.

This could either be done on the entire hierarchy, making a full suit change, or per body part for a game where you get individual parts. A mirrored flag could make it so both arms and both legs switch at the same time. So basically

player.ChangeClothesSet("hamata_iron");

or similar for a new look.

This would basically be a wrapper around Anima2D with predefined skeletons and animations. Walk, fight, defend, death, surprise, chat should be enough.

For a top-down character system you’d also need to include scripts to do the swap-out for directional versions of the different parts as needed. Simple enable/disable does the trick, but this is just enough work that it isn’t newbie-friendly if you don’t include it. Another method call with a direction, I guess.

Yes, it’s a tall order :slight_smile:

Thank you a lot! It gave me a few ideas.
I like the idea of objects/prefabs that hold the graphics for each cloth.

More ideas and opinions are most welcome!

I would use ScriptableObjects for the different sprite sets. Then each clothing set is an asset in the project and you’d have your script point to the loaded asset to find the correct sprite. Then it really doesn’t matter what you name each sprite as you’d just assign it to a field in the SO. This would also allow the developer to make his or her own sprite sets and plug them into your system fairly easily. You could have a shirt SO, a pant SO, hair etc… Then you could make a whole set by combining one of each.

2 Likes

That would be ideal to provide a finished system. Unfortunately, I’m an artist and intended to only provide the art assets.
I will, of course, make a few finished characters as prefabs for anyone who just want a few quick characters. And they can obviously make their own characters by selecting the “item slots” in the hierarchy and change the sprites manually.

Maybe that’s really enough + documentation. The advanced user will do his own system with what is provided.