I wonder how do they implement the bone animation in the flash game http://www.foddy.net/athletics.swf Do you know any study materials which I can start to learn 2D bone system from? I just implemented a avatar system by compose multiple bitmaps in each frame(similar with maple story), but some guys tell me that, a bone system can save more art resources, so I want to learn some thing about that.
1 Answer
I'm pretty sure the bones/joints in QWOP (the game you're referring to) are modeled using the Flash Port of Box2D. By pressing the buttons you apply forces to these joints and make the character move eventually.
On the Box2D page you'll also find ragdoll examples that might serve as a starting-point for your characters. You should be aware that creating animations using such a setup (eg. using a physics-engine and apply forces to joints) can be very complicated and might not yield the desired results.
If you just need a "skinnable" avatar, it would probably be simpler to use pre-animated characters. You can use the bones-system of Flash for this and replace the different MovieClips (eg. upper leg, lower leg etc.) at runtime to get some sort of skinning.
Update: I created a very basic example how you could easily change the appearance of an animated character (click to change skin, sorry for crappy art). Source file is here. Different skins are on different frames. You could most likely extend this concept to dynamically load new skins though.
-
1\$\begingroup\$ Could you please re-up this file? The link is dead. \$\endgroup\$ Oct 21, 2012 at 16:23
-