Should I use Spine for everything? (SOLVED)

Hi!

Defold made me discover Spine and I love it.

However, should I use it for everything? Could there be performance drawbacks if I just want simple animations that could be easily done in the code (but just more convenient with Spine because I can use the graph tool and I know that all my animations are Spine-animations).

Should I use Spine as much as I can or only when I need it?

Good question. I honestly don’t know. I guess you should always keep a close eye on the profiler. @Andreas_Jirenius has quite a bit of experience working with Spine in Defold and should be able to provide some insights as well. @Andreas_Jirenius: When you’re back from holiday maybe you could pitch in and provide some info?

1 Like

Actually the biggest performance drawbacks you might encounter lies in using both Sprites and Spines in a mixed manner.
Simple Spine animations (like 1 bone and some translations or flipbook animations) has very little overhead and will not be a bad alternative to simple Sprite animations.

The problem you might wind up in is if you mix Sprites and Spine in the draw order you would like them to be.
They are two different objects with two different materials and will break the batch as soon as it switches between sprite <–> spine.
I had the same fear using too many Spine objects for simple stuff but performance actually increased when reverting to only using Spine instead of Sprites on some objects.

BUT: If you know that you have a lot of objects that all together will be sprites and will be rendered in the same batch, sprites still will be a little bit faster.

Hope it helped a little bit… otherwise just ask.

/Andreas

1 Like