from https://gamedev.stackexchange.com/questions/44319/what-animation-technique-is-used-in-dont-starve
Q
While playing a few games in my personal time off development I've stumbled across a survival 2D/3D survival game. The game was apparently made in SDL and GLUT (Dont starve) but what really amazed me was the animations in the game.
The animations are extremely smooth and fluent. There is no distortion while animating, what usually happens in hand-made animations is that pixels get removed, animations are jaggy and they simply aren't as smooth. That got me thinking on how they managed to accomplish such a quality of animations. Were they really handmade (If they were, then it must've taken a very talented artist), is it bone animation or are they using another technique?
A
My name is Kevin, and I'm a programmer/designer at Klei. I wrote a bunch of the animation stuff that we used in the Shank series, Mark of the Ninja, and Don't Starve.
Our animators work in Flash. We have a concept of a character 'build' which is a set of body-part symbols with multiple views. Depending upon the fidelity of the given game, there are more or less body parts with more or less 'view'. I think that Shank had about 30 body parts with 1-2 dozen views each, while Wilson from Don't Starve has about a dozen body parts with only about the same number of views. Custom JSFL scripts are used to analyze the flash symbol timelines, and then bake out the relevant images as a series of high-res PNG files, along with a bunch of metadata that we stick in an XML.
Given a character build, our animators create a new root symbol in another file to contain a chunk of animation for that character. In that timeline, they create the character out of build symbols and move it around, tween it, etc. to create individual animations (which are demarcated using frame labels). The exporter script exports these timelines into XML, taking note of the 2d transform of every build piece, and which view it is showing.
With all of this information exported to XML and PNG, we run a series of Python scripts to convert them into run-time data. One script downsizes, atlases, and mips all of the textures and convert them to (one or more) compressed, platform-specific formats. Another script processes the XML animation data into a more efficient to load binary format.
At run time, It's really just a matter of showing the right build symbols with the right transforms and view.
This system took a long time to build, and has been refined as we've moved it from game to game. There are a lot of details that I'm glossing over (like how we handle layering and run-time costume swapping), but that's the general outline.
Of course, the technology that we use is probably the least important aspect of the 'Klei Look'. The most important part is that we have a bunch of really, really good animators. :)
Anyway, I hope this helps. If you have any more questions about Don't Starve, you can stop by our forums, where I'm usually quite happy to talk shop.