12
\$\begingroup\$

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?

\$\endgroup\$
6
  • 2
    \$\begingroup\$ I would suggesting that you contact the developers themselves to have such precise information on technologies used. Anyone that didn't work on the game can just stipulate without being sure. \$\endgroup\$
    – DogDog
    Commented Nov 23, 2012 at 19:17
  • 2
    \$\begingroup\$ Well when asking this question I made a few assumptions, which are: 1. Contacting the developers themselves has a very low chance of success (why would anyone share their secrets to a random person, and how much time do they have to check their emails?) 2. I can get a much faster answer on this website, which consists of people who have years of background experience and whose answers I value, even if they are merely speculations and last of it, the developers themselves may be using this site and could answer this question but that is very far off. \$\endgroup\$
    – Bugster
    Commented Nov 23, 2012 at 19:27
  • 1
    \$\begingroup\$ Most programmers are really open on sharing their knowledge, and I don't think the way they make their 2d animations that much of a secret, I think it's worth a try. Maybe if you tell them a little about you and why you want that they might be more interesting in helping you or giving you advices. \$\endgroup\$
    – DogDog
    Commented Nov 23, 2012 at 19:30
  • 1
    \$\begingroup\$ See the FAQ about "what technology some particular game used" Asking how to achieve a similar effect would be a much better question. (Though likely a duplicate to something already on the site.) \$\endgroup\$
    – House
    Commented Nov 23, 2012 at 19:39
  • \$\begingroup\$ This question appears to be off-topic because it is about the technology some other game used. \$\endgroup\$
    – House
    Commented Feb 2, 2014 at 21:35

3 Answers 3

40
\$\begingroup\$

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.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ thanks for the in-depth. I think that the system you have really helps facilitate a great highly-fluid characters, which most small-budget teams (and some high-budget teams) could only imagine. Its certainly safe to say that if you were just doing sprite art, with no interpolation/transforms of body parts, or just transforms and no states/views, it wouldn't feel quite as incredible. Like you said though, a tool is doing a good job when it gets out of the way and lets the artist shine, which Klei does a lot. I've got to say, I've loved all of your stuff, and thanks for PC ports. \$\endgroup\$
    – LetterEh
    Commented Dec 3, 2012 at 7:54
  • 2
    \$\begingroup\$ Glad I could help! I think our artists would actually prefer to work under a system where we just baked out every frame as a sprite, but then we wouldn't be able to do costume swapping, and the texture sizes would be prohibitive. \$\endgroup\$
    – Kevin
    Commented Dec 3, 2012 at 7:56
  • 1
    \$\begingroup\$ Amazing, I never thought I'd get an answer from a developer of the actual game. I thank you for taking the time to answer this. +1 \$\endgroup\$
    – Bugster
    Commented Dec 4, 2012 at 7:24
7
\$\begingroup\$

Klei typically uses a really nice combination of Skeletal animations and sprite-changes.
They rig a skeleton, apply sprites to the bones and then they'll swap sprites as an animation frame calls for it.

The exact "how" (workflow/tools/etc) can really only come from them, however, they said so themselves when advertising "Shank", pre-release.

And if you look at Shank/ShankII, Mark of the Ninja and Don't Starve, you'll notice that the animation looks a lot like the stuff that might come out of Nickelodeon.

I would imagine that they're working with scene graphs to keep everything sane, as well, but again, that's more an assumption based on complexity and what works for animation (2d/3d) than a guarantee.

\$\endgroup\$
2
  • \$\begingroup\$ Since this is really just a guess, it would probably work better as a comment. Not really your fault, there's no way to not guess unless you're the developer. (problem with the question not your answer) \$\endgroup\$
    – House
    Commented Nov 23, 2012 at 20:11
  • \$\begingroup\$ This pretty much answers the question I asked, I had something similar in mind, but it appears you are right. \$\endgroup\$
    – Bugster
    Commented Nov 24, 2012 at 8:03
2
\$\begingroup\$

I think they definitely use bone animation. They also either use high-res sprites(to prevent jagginess) or they use some form of vector graphics. It is entirely possible, they pre-rendered vector graphics into high res sprites. They definitely did not use pixel art for this one. :)

\$\endgroup\$
6
  • 2
    \$\begingroup\$ More of a comment than an answer wouldn't you say? \$\endgroup\$
    – House
    Commented Nov 23, 2012 at 20:10
  • \$\begingroup\$ vector graphics in openGL? It's possible but I really doubt an indie developer would go to such lengths. \$\endgroup\$
    – Eric B
    Commented Nov 23, 2012 at 20:24
  • 1
    \$\begingroup\$ @EricB Alright, it might be pre-rendered into sprites or it might be hand drawn and rendered in high resolution. It is definitely not sprites in the "classic sense" (ie pixel art) like Spelunky and Cave Story. \$\endgroup\$
    – AturSams
    Commented Nov 23, 2012 at 20:48
  • \$\begingroup\$ @Byte56 I agree with you. I am answering more on how to accomplish similar visuals than what did their artist do on this one. \$\endgroup\$
    – AturSams
    Commented Nov 23, 2012 at 20:59
  • \$\begingroup\$ @Byte56 since the question is so difficult to answer, the only viable answers are assumptions, but this answer could very well be a possibility, thanks. \$\endgroup\$
    – Bugster
    Commented Nov 24, 2012 at 8:05

Not the answer you're looking for? Browse other questions tagged .