Programming - Character Creation

I'm back with my second post about characters! This time it was my job to get characters into the game in a way that means we can have both male and female characters, and aspects of those characters' anatomy can be easily changed as the game is played. My go-to example is that during play, you might get a power that replaces your arm with a tentacle, or a bionic arm, or your hand with a crab claw, craziness like that.
Doing all of this without having entirely separate character models is essential for us to cut down on the eventual file size of Super Street Skate, and means that we don't have to figure out each and every combination of 60+ different body part pieces (For all you who want to know, it's about 5.5 million different combinations per gender).

 Early prototype of body part swapping.

Early prototype of body part swapping.

On to the programming side of things.
One of the many key skills any good programmer should have is the ability to use search engines to find out if anyone else has had the same problem you have, and how they fixed it. This was an opportunity for me to use that skill, as when I started the prototype for this, I had almost no idea how to begin. I started with some research into the area, and brainstorming up a few particularly ludicrous ideas including but not limited to what I called "Chuck it all in", where we have all pieces of all models cut up into individual components, and they would be permanently attached to the bones of the player rig, and turned on and off as and when needed. For the sake of tidiness, sanity, and framerate I decided against doing things this way.

What I instead went with was a solution found on the Unity forums. This method was originally intended to just apply clothes onto a model, but with a whole load of adaptation and working with our animator Marin, we tweaked our model and the code to allow this little piece of magic to happen.

 Current prototype for bodypart swapping

Current prototype for bodypart swapping

Something you may have noticed in the above gif is that rollerblades are added to the character afterwards. That is because not only are we looking to have interchangeable body parts, we also want the player to have different outfits to wear, so you can customise your character even further. There will probably be another blog post on that later!

People who found this post through Twitter,  our Facebook page is here!
Likewise those of you who found this through Facebook, our Twitter is here!
If you found us through a search engine or came directly, awesome! Click the links above!