Skinning an Orc

Winter approaches. This year seemed to fly by. It’s almost Christmas! Lately I’ve been working on programming for my yet to be released Bowmaster Winter Storm Beta. I have been working on some cool stuff that will help me optimize file size and increase productivity in the long run. Specifically I’ve been working on character skinning. In the past I used unique movie clips for each character even if they used the same animation. So for example when I wanted to create new units I would just copy and paste the same animation and rename and manually re-skin the graphics. The problem is that each copy has its own set of hundreds of animation key frames. This was the design approach that I carried over from Prelude and with the amount of content planned for BM2 this is just not going to work out anymore. Flash tends to choke and crash when I open the animation library because there’s just so much there (and I plan on adding lots more!). Hence, it was time for me to take action.

I’ve redesigned the beta build of BMWS so that I only have one animation clip per character type that I can then dynamically change the body parts to. So imagine a stick figure that has all the basic animations such as walk, attack, die… Then I just attach whatever parts I want to the stick figure and make the stick parts invisible. Since there’s less duplication in the Flash library, the export .swf file size is reduced which means the game loads faster and can be easily be uploaded to other sites that have file size restrictions. It also means I can cram more content into the game without using as much space and without crashing Flash as often (not a hard thing to do by the way).

This new approach will also increase productivity. In the past, if I wanted to change the animation of the walk sequence I would have to manually fix the animation in all the characters that used the same walk method. Now I can just make the fix to the main animation clip and all characters that use that animation model are automatically updated.

And lastly, aside from increased productivity and reduced file size, this redesign opens up the possibility for increased variety in character models. For example, in the past if I wanted to make two skeleton grunts with the same animation to have two different weapons (one a sword and one an axe let’s say) then I would have to create two different movie clips (or do some other tricky sub-clip key frame magic). Now I can swap any body part at any time, including the weapon. Now that everything is skinable, all body parts are targetable through Action Script. I can load anything from armor, weapons, clothes, monkeys, ham sandwiches, anything. Imagine instead of seeing the same ninja graphics for every rank, you see the color of his belt change. Higher level orc grunts could have spikier armor and meaner looking helms than the low level initiates. Maybe you could even upgrade the weapons or armor of your own troops and see this reflected in the character models. These are still just examples of what is possible – I won’t give away any specific new details just yet.