{"id":374,"date":"2009-11-20T11:14:56","date_gmt":"2009-11-20T19:14:56","guid":{"rendered":"http:\/\/www.lostvectors.com\/blog\/?p=374"},"modified":"2010-10-11T11:17:54","modified_gmt":"2010-10-11T19:17:54","slug":"skinning-an-orc","status":"publish","type":"post","link":"https:\/\/www.lostvectors.com\/blog\/2009\/11\/20\/skinning-an-orc\/","title":{"rendered":"Skinning an Orc"},"content":{"rendered":"<p>Winter approaches. This year seemed to fly by. It&rsquo;s almost  Christmas! Lately I&rsquo;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&rsquo;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&rsquo;s just so much  there (and I plan on adding lots more!). Hence, it was time for me to take  action.<\/p>\n<p>I&rsquo;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&#8230; Then I just attach whatever parts I want to the stick  figure and make the stick parts invisible. Since there&rsquo;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).<\/p>\n<p>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.<\/p>\n<p>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&rsquo;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 &ndash; I won&rsquo;t give away any specific new details just  yet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Winter approaches. This year seemed to fly by. It&rsquo;s almost  Christmas! Lately I&rsquo;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&rsquo;ve been working on character skinning. <a class=\"continue-reading-link\" href=\"https:\/\/www.lostvectors.com\/blog\/2009\/11\/20\/skinning-an-orc\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-374","post","type-post","status-publish","format-standard","hentry","category-devlog"],"_links":{"self":[{"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/posts\/374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/comments?post=374"}],"version-history":[{"count":2,"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/posts\/374\/revisions"}],"predecessor-version":[{"id":376,"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/posts\/374\/revisions\/376"}],"wp:attachment":[{"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/media?parent=374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/categories?post=374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/tags?post=374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}