博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
about
阅读量:5122 次
发布时间:2019-06-13

本文共 3084 字,大约阅读时间需要 10 分钟。

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.

 

转载于:https://www.cnblogs.com/Searchor/p/6756722.html

你可能感兴趣的文章
mac OS环境下的PHP环境配置
查看>>
HIVE数据操作
查看>>
Saving Activity state in Android
查看>>
SquirrelMQ消息队列
查看>>
剑指Offer_编程题_4
查看>>
有多少人忽视了这简单的道理,又有多少人觉得理所當然。。。。
查看>>
练习笔记:net,JqueryUI实现自动补全功能
查看>>
[转帖]SQL中partition关键字的使用
查看>>
小程序实战小汇总
查看>>
inner join 与 left join 之间的区别
查看>>
系统对接API调用
查看>>
POJ 3398 Perfect Service(树型动态规划,最小支配集)
查看>>
Servlet的生命周期和工作原理
查看>>
【树链剖分模板】bzoj1036 树的统计
查看>>
一些作业
查看>>
ajax使用异步问题
查看>>
唯有志存高远,方能风行天下
查看>>
Linux产生序列数字
查看>>
【循序渐进学Python】9.异常处理
查看>>
"围观"设计模式(7)--创建型之单例模式(Singleton Pattern)
查看>>