Sprite animation software

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
hardcrawler
Prole
Posts: 12
Joined: Fri Jun 27, 2014 11:31 pm

Re: Sprite animation software

Post by hardcrawler »

nuno wrote:
one further question, do you know if it is possible from the API of either spine or sprite, to control one aspect of the skeleton without using animations?
for instance, I want the head of the character to keep looking at the mouse cursor, so I just need to rotate one bone continuously.

is this possible?
It's certainly possible with my Spriter library, but currently it would require a bit of understanding of the internals of the data structure to accomplish. I calculate all position/rotation interpolation for every render, and this is done hierarchically from the root bone down to the "leaf" nodes. You'd have to intercept the transformation of your desired node at the point at which its transformations are being applied.

I am using a similar approach for swapping out images to be rendered:

Code: Select all

function Spriter:getSwappedImage( imageName )
        local name = imageName

        if self.imageSwaps[imageName] then
                name = self.imageSwaps[imageName]
        end
        local altFile = self.filenameLookup[name]
        assert(altFile, "Unable to lookup image " .. tostring(name))
        return altFile
end
It would be fairly straightforward to add a get/set pair for "setSwappedTransformation( boneName )" I do intend on adding that functionality at some point.
User avatar
clofresh
Citizen
Posts: 87
Joined: Sun Jul 26, 2009 4:21 pm
Contact:

Re: Sprite animation software

Post by clofresh »

I like working with Spine a lot. I feel very productive when using it, and it's great to be able to reuse the bone animations for various different skins. I've made a few animations with it for a messy and incomplete prototype:
crowded-street.love
(1.21 MiB) Downloaded 149 times
Panther animation:
panther
panther
hUKq8Cz.gif (297.2 KiB) Viewed 1882 times
One minor complaint I have is that Spine's Love API feels a little more complicated than it should be, most likely because it's a port from heavily OO languages like Java/C#. Luckily it's open source so you can mess with it as you see fit. I've already submitted a pull request to fix a bug, though they haven't merged it yet. Maybe if enough LÖVErs start using Spine, we can take on the maintenance of the runtime and make it LÖVEly.

As far as controlling specific bones programmatically, I believe you just need to do

Code: Select all

skeleton:findBone('mybone').rotation = whateverval
----------------------------------------
Sluicer Games
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests