SPINE - Animation Software (LÖVE compatible)
Re: SPINE - Animation Software (LÖVE compatible)
I'm interested in Spine and I'd like to try it out with LÖVE. I'd be willing to tweak the Corona runtime to make it work with LÖVE. But before I do that, I'm wondering if anybody is working on it already, or if there's already a working implementation out there?
Re: SPINE - Animation Software (LÖVE compatible)
Not that I know of, no. I want to make the Lua runtime so the majority of it is reusable, then people only have to implement rendering for whatever game toolkit. I'm neck deep in C/C++/ObjC crap though.
Re: SPINE - Animation Software (LÖVE compatible)
I've ported Spine to LÖVE!
Changes are documented in readme.txt, but basically, I've isolated the API-agnostic code in a separate package, so that the platform-specific parts boil down to very little code. As a proof of concept, the included .love file is runnable with LÖVE of course, but if you extract it and rename "corona-main.lua" to "main.lua", it still works with Corona.
Since I don't have a full copy of Spine (yet!), I couldn't really test this extensively, but it seems to work alright with spineboy and goblins... Except for the fact that after mixing two animations, the angle seems to be off by a few degrees (I'm probably not using the API exactly as intended?).
Changes are documented in readme.txt, but basically, I've isolated the API-agnostic code in a separate package, so that the platform-specific parts boil down to very little code. As a proof of concept, the included .love file is runnable with LÖVE of course, but if you extract it and rename "corona-main.lua" to "main.lua", it still works with Corona.
Since I don't have a full copy of Spine (yet!), I couldn't really test this extensively, but it seems to work alright with spineboy and goblins... Except for the fact that after mixing two animations, the angle seems to be off by a few degrees (I'm probably not using the API exactly as intended?).
- Attachments
-
- spinedemo.love
- (287.57 KiB) Downloaded 426 times
Last edited by Chèvre on Wed Apr 03, 2013 5:33 pm, edited 1 time in total.
Re: SPINE - Animation Software (LÖVE compatible)
Cool! Thanks for that! I haven't looked at the code yet, but do you mind if I made use of it for Spine? You would need to release it under the same license as the Spine runtimes (simplified BSD).
Not sure on the angle issue, would have to see it. For Java and C/C++ I've implemented two classes called AnimationStateData and AnimationState which handle mixing animations for you. It's way more convenient. I haven't ported it to Lua yet, but it shouldn't be hard.
Not sure on the angle issue, would have to see it. For Java and C/C++ I've implemented two classes called AnimationStateData and AnimationState which handle mixing animations for you. It's way more convenient. I haven't ported it to Lua yet, but it shouldn't be hard.
Re: SPINE - Animation Software (LÖVE compatible)
Sure! I've added a license blurb in all the Lua files that were missing one, and I've left your original license in the files that I haven't written from scratch. The updated file is in my original message.
- monsieur_h
- Citizen
- Posts: 69
- Joined: Tue Oct 30, 2012 4:43 pm
Re: SPINE - Animation Software (LÖVE compatible)
Thank you chevre !
I'm trying to use your runtime in my project but I have some issue when loading the data. I'm not at ease with Spine's architecture yet, and I have a single file as a result of my export. It contains evrything (bones, slots, animation... ). I don't see how I can load and apply my animations from it. I struggle finding a good bootstrap in the official documentation, so, at this point, any hint is welcome !
Thank you !
I'm trying to use your runtime in my project but I have some issue when loading the data. I'm not at ease with Spine's architecture yet, and I have a single file as a result of my export. It contains evrything (bones, slots, animation... ). I don't see how I can load and apply my animations from it. I struggle finding a good bootstrap in the official documentation, so, at this point, any hint is welcome !
Thank you !
Re: SPINE - Animation Software (LÖVE compatible)
Spine's export format has changed, sorry about that. The data is the same, it is just in a single file. You can probably grab the Lua from spine-corona on Spine's runtime github repo and fix up the Love runtime pretty easily.
Re: SPINE - Animation Software (LÖVE compatible)
I've created a generic Lua runtime and refactored spine-corona to use it. I've also added an official LÖVE runtime. Thanks Chèvre! Using your code as a reference made it very easy.
- monsieur_h
- Citizen
- Posts: 69
- Joined: Tue Oct 30, 2012 4:43 pm
Re: SPINE - Animation Software (LÖVE compatible)
Great ! You did it really fast and it's really easy to use now! I made a little try over there and I'm really happy with it (even I'm a fairly poor animator).
Re: SPINE - Animation Software (LÖVE compatible)
Great thats now official supported!NateS wrote:I've created a generic Lua runtime and refactored spine-corona to use it. I've also added an official LÖVE runtime. Thanks Chèvre! Using your code as a reference made it very easy.
Thanks.
Who is online
Users browsing this forum: Ahrefs [Bot] and 8 guests