How Do Terraria Animations Work?

Started by
6 comments, last by Ovicior 9 years, 4 months ago

Hey,

I'm wondering how the Terraria animations work. Are there just many frames squeezed together? Or it is like a 3D rig with built in animations? I'm very curious and would like to know for future reference. Far as I know, Terraria was coded in C# and Visual Studio was used as the IDE.

Thanks,

Ovicior

What will you make?
Advertisement
Lots of things are multi-sprite animations, but other things like swinging a weapon/tool just rotate a single sprite.

Complex things like worms or most of the bosses have a sprite for each individual part, each being individually positioned and rotated by code.

All of the animation is hardcoded into the game itself rather than being driven by the assets themselves. (hardcoding the amount of content that Terraria has is generally a terrible idea if you have non-programmers who want to add content - but hey, they shipped a successful game and made a ton of money, so shows what I know smile.png ).


You can actually make an XNA 4.0 project and load Terraria's XNB image files into it to view what they contain if you're interested in particular parts.

All of the animation is hardcoded into the game itself rather than being driven by the assets themselves. (hardcoding the amount of content that Terraria has is generally a terrible idea if you have non-programmers who want to add content - but hey, they shipped a successful game and made a ton of money, so shows what I know smile.png ).

Terraria is hardly a shining example of game development and the fact it "shipped" and made a lot of money shouldn't really detract from that.

I would advise not looking too closely for inspiration from a game that boasts every item in a giant file, ever entity in a giant file, a function for every single piece of dialogue in the game.. in each language in one giant file.

You could write a book about Terraria's code. There are games out there with a LOT more skill put into them that don't ever come close to the popularity of Terraria, like Minecraft, some games will just defy the general standard.


Lots of things are multi-sprite animations, but other things like swinging a weapon/tool just rotate a single sprite.


Terraria is hardly a shining example of game development and the fact it "shipped" and made a lot of money shouldn't really detract from that.

Thanks guys. But what would a good, efficient way of animating sprites be? I'm really curious,in case I want to dabble in 2D sprite-style games.

What will you make?

It's all just a matter of preference. You can have each "part" of your sprite rigged so that it can act like a ragdoll (would require extra software), or you can do spritesheet animations.

skeletal


Lots of things are multi-sprite animations, but other things like swinging a weapon/tool just rotate a single sprite.


Terraria is hardly a shining example of game development and the fact it "shipped" and made a lot of money shouldn't really detract from that.

Thanks guys. But what would a good, efficient way of animating sprites be? I'm really curious,in case I want to dabble in 2D sprite-style games.

skeletal animation

http://esotericsoftware.com/

Mobile Developer at PawPrint Games ltd.

(Not "mobile" as in I move around a lot, but as in phones, mobile phone developer)

(Although I am mobile. no, not as in a babies mobile, I move from place to place)

(Not "place" as in fish, but location.)

skeletal animation

http://esotericsoftware.com/

Even if you don't end up buying that software, that video does a very good job of showing what skeletal animation looks like with sprites.


skeletal animation
http://esotericsoftware.com/

THanks

What will you make?

This topic is closed to new replies.

Advertisement