Game Development Community

Changing weapons/apparel on animated sprites

by Christian · in Torque 2D Beginner · 08/16/2013 (8:43 pm) · 3 replies

How are some of the ways people handle switching clothes/gear on animated sprites, is it just making a new sprite for every clothing/sword/etc combination?

I remember in torque 3d you could select a mount point for a sword with that being an actual physical object. Is there a similar technique where you can pick a point on 2d sprite and have that piece of gear interchangeable on it (like a composite sprite that you can mark a characters hand in each frame and the 2nd sprite 'sword' would always follow where that point is).

This might sound like crazy talk, but looking for a better way to do it then having a million different sprites with minor differences.

#1
08/16/2013 (10:40 pm)
Even if an armor piece followed the translation of a point, it wouldn't follow the rotation nor be foreshortened. With a skeletal animation system it could follow translation and rotation (still no foreshortening). You can do it all in 3d and then turn the pieces into sprites, then you'd have translation, rotation, perspective. Then it's up to your artists to make it look like pixel art (or keep the 3d look).
#2
08/16/2013 (11:46 pm)
This type of system would require behaviors and precise calculations to replicate properly. And yes, it would still require many many sprites to achieve a result as complex as you envision.

The other option would be to use Spine, which offers 2d skeletal animation.
In Spine, you can create a skin, which would allow you to easily create many different combinations of armor or clothing. You can then either export the skeleton data to .json and import it in T2d or render the sprites individually for your needs.

The T2D Spine implementation is functional but not as deep as it could be at the moment. It is one of the things we are looking to integrate fully into the engine for 3.0.
#3
08/17/2013 (12:30 am)
Spine looks like a good way to go for this, will look into that. Thanks for the ideas.