Module for Quick implementation of Spine Animations

Hi, sorry to ask another question,

I have spritesheet with 3 object. 2 object is 2500 width.

I have create animation in spine, its works well. Then i try to import in corona.

The thing is , the 2 object with 2500 width is not shown. Its replaced with 1st object.

How does that happen? should i replace the large object ? It didnt support ?

thanks

Wow @Juf Jannie thanks a lot for helping other users of my module, I really appreciate all your help, and thanks for the advice on the videos, yes you are right, I think I overused noise reduction in my attempt to get rid of all of it. Sometimes I can go crazy fine tuning the editing of the videos.

Regards

Hector

@hiccastudios Images seem to be very big, so my gut feeling tells me that maybe the problem is the texture size. If I remember correctly, the maximum texture size of an iPhone 5 is 2048x2048 and just the most recent iPads support double of that. I would recommend you try to implement animations with images that are smaller and see if that works.

Hi Hector,

First animation works. i scale down the images.

But second one is not working again. Images is already small too.

so its looks like only load 1st images only. very strange

found the problem.

PATH in Spine 

Hi guys,

As promised I just made this 12 minute video where I show you how to setup a basic Spine Animation starting from zero, using the free SpineHelper module. I think I had a few folders and files in the sample code that created a little bit of confusion as not all of them are required, so that’s why I decided to shoot this video, so you can see how I setup a basic animation starting from scratch. I hope it is useful.

I received a couple of questions about how to implement it in Kwik, so that video tutorial is next on my list. 

1.- You can watch the video here: https://www.youtube.com/watch?v=5E-SPPJU0S8&feature=youtu.be

2.- In case you haven’t downloaded the module, you can get it from here: http://www.spinehelper.net

Regards

Hector

Hi Hector, this is a much apreciated module to be able actually use Spine in Corona.

Question - how does SpineHelper address the use of events set up in Spine? For instance, we have a random animation player set up whereby an event starts another event.

Hi Hector. Thanks for this awsome library. Do you plan to put it on GitHub so people can contribute back?

Thanks coronasdk771, yes good idea, let me put it in Github later tonight so everybody can contribute. I’ll post the link here when it’s ready

Regards

Hector

Hi,

there seems to be an error in spineHelper.lua

line 511

currentAnimation = state:getCurrent(0).animation.name

It some how sometimes generates a runtime error.

When I run my app it runs it changes it a few times and then it pops up. Then works again a few times.

I have 3 animations in my sprites.

I changed it to “rest” state animation so it always has that as a default. And it seems to have solved it.

This only happens on the device not on the simulator.

I checked for capitalisation, but couldn’t find any errors.

Is there somewhere I can look in my code or is this a spineHelper problem?

@Hector

awsome!

@Juf Jannie

The line you mentioned is 520 in my case. I re-downloaded SpineHelper few days ago, maybe Hector made few tweaks here and there after you got SpineHelper. It might be worth re-downloading it.

Has anyone figured out how to listen for Spine “Events” within the context of using Hector’s Spine Helper? Having some trouble figuring out exactly how to do this…

(and thanks for this module, Hector!!)

Has anyone figured out how to fix the runtime error on that “currentAnimation = state:getCurrent(0).animation.name” line in the module? For me it’s on line 522 of the module.

When I change animation with changeAnimation() I always get “Initial Animation is still running” in the console but never get runtime error. I also noticed that previous animation keeps playing for some time (2-3 secs) before transition to desired animation.

In the mean time I added remove() method because I didn’t know how to get rid of loaded testures. Improvements are welcomed :wink:

[lua]

function SpineHelper:remove(…)
    self:stopAnimation()
    for k,v in pairs(self.skeleton.images) do
        if type(self.skeleton.images[k].removeSelf) == “function” then
            self.skeleton.images[k]:removeSelf()
        end
        self.skeleton.images[k] = nil
    end        
end

[/lua]

Also added one line in initialize()

[lua]

        self.skeletonData = skeletonData
        self.skeleton = skeleton
        self.root = root
        self.stateData = stateData
        self.state = state

        sheet = nil    – sheet is no longer needed

[/lua]

Has anyone figured out how to add touch listeners to whole animation object or specified bones? It can’t get it working.

Hey guys,

My apologies for not getting back sooner. I have two good news and a bad one:

1.- I have posted the SpineHelper library along with sample codes (including Photoshop, TexturePacker files) to GitHub so everyone can contribute and make it better. You can find it here: https://github.com/CoronaDevs/CoronaSDK-Spine-Helper

2.- I also created a FREE full video course (25 lessons) that teaches you the whole process from creating and designing a character in Photoshop,  creating the ImageSheet in TexturePacker, the animation of several characters in Spine, to the whole implementation in Corona, including adding interactivity to the characters created. You can find the tutorials here https://www.youtube.com/playlist?list=PLKhvt82d5sfCE6KkM1V6Bs46GG4HOguP1

3.- Finally the bad news… I’m no longer maintaining the library as I’ve been busy with other stuff in my life, but I didn’t want to leave without giving you access to the code in GitHub and the video tutorial. Feel free to make edits or create a totally new version of my code, I’m sure you can take it to a new level

Regards

Hector

Hi Hector, thanks for putting source on GitHub and videos. Could you please add license info for SpineHelper? Without it it may be blocking use of SpineHelper in some cases. Hope the community will pick up development, will you accept any pull requests or should we use our forks?

Hi there!, sure I can add license info, any idea of what good wording I could use? I think it’d be better to let everybody to use their own fork that way they can work independently of mine

Regards,

Hector

I think MIT will be good. https://tldrlegal.com/license/mit-license

Does anyone know if it’s possible to use multipacked image sheets out of texture packer with SpineHelper?

No, SpineHelper assumes all sprites are on single sheet but you could easily hack that.