Spine: 2D skeletal animation tool

@Luis Mendes: It does work :)! My BAD, the build_native compiled just the library, I forgot to open the project in Eclipse and build the apk. Sorry about that.

Stanko Krstić wrote:

@Luis Mendes: It does work :)! My BAD, the build_native compiled just the library, I forgot to open the project in Eclipse and build the apk. Sorry about that.

No problem, good it works :slight_smile:

Nathan Sweet wrote:

For Box2D you’d use the skeleton and animation to position Box2D bodys. For rag doll you’d stop positioning them and let the physics take over. Here is an example of the first part (in Java):
https://github.com/EsotericSoftware/spine-workshop/blob/master/src/com/esotericsoftware/spine/workshop/I\_Box2D.java
>
Yes, you can manipulate bones at runtime and combine that with animations:
https://github.com/EsotericSoftware/spine-workshop/blob/master/src/com/esotericsoftware/spine/workshop/H\_AnimationProcedural.java

Perfect, thanks !

I had to change CCSkeleton to have ‘protected’ for Atlast* atlas and ownsSkeleton so I could sub-class.

Bad idea?

If that works for you it isn’t a big deal, but I don’t think you should have to. You can use the CCSkeleton(SkeletonData**,bool) constructor or setSkeletonData to set a SkeletonData** and ownsSkeletonData. CCSkeleton does not need an Atlas**, it only has an Atlas** field so it can release the memory in the case when CCSkeleton allocated an atlas (which is really just for your convenience). The atlas is just to load the region attachments for the SkeletonData, you don’t need to set an atlas at all. If you have an atlas you need to release in your subclass, you can just release it in the destructor.

Hi, first at all thanks for the amazing work =D

Actually I’m testing the cocos2dx and works (I did some changes to work idk why)

But doesn’t show the skin or png I don’t know why =(

I debug the code but I’m not sure why no load the image.

Thanks.

It should work without changes. I would get the example to work without changed first.

It seems like the version included with 2.1.3 is very different than the one in GitHub.

Is it much newer or much older perhaps? 2.1.3 seems to be missing a lot of methods.

2.1.3 is a version of what? github is where the latest Spine runtimes are.

2.1.3 Cocos2d-x

  • Added support for Spine skeleton animation editor

In cocos2d::extensions there is now spine-cocos2dx.h but it seems out of date.

I’m assuming we’ve having some type of communication snafu if you didn’t realize it was being rolled into the main distro zip.

Ahh, yeah I didn’t know it was being included. That is cool, but the github will still always have the latest. They can snapshot it and put it in cocos2dx builds, no problem.

Nathan Sweet wrote:

2.1.3 is a version of what? github is where the latest Spine runtimes are.

I believe Cory means the cocos2d-x version, latest stable version came with spine extension (oldie still c++ version).
I have an active pull request to update it, it needed some changes to comply with their extension requirements though.
Please have a look and contribute if necessary.

I really like the location (cocos2d::extensions) and the ease of use potential including it in cocos2d-x directly.

I was upgrading to 2.1.3 to see if it included fixes for the memory issues, so for now I will stick with 2.1.2 and Spine GitHub.

Making the most current version of Spine + Memory Fixes + 2.1.3 would be amazing :slight_smile:

Yeah, it’s nice to have it included, but it’s still being pretty actively developed. Well, it hasn’t seen a whole lot in the past couple weeks, but changes and pull requests are making it in.

Ok now works thanks =D. I was working with the last version (include spine) but it’s the last version of spine.

I updated and now work good.

Thanks =D

Nathan — are any of those pull requests or changes related to addressing the memory leaks in the Cocos2d-x wrapper?

I’m curious because if no one else is able to address it then I’m going to have to try :slight_smile:

Spine is such a fantastic tool. Major game changer for my team — we are so happy to have been part of the KickStarter!

The task to find the memory leaks has been around for a couple weeks, sorry. I’m trying to finish up onion skinning and do a new release in the next day or so, then I’ll go back to some of the runtime tasks such as the memory leaks. Feel free to beat me to it! :smiley:

What’s the usual path to getting included in the extensions/ package of cocos2d-x? My team is using this as well, and I whipped up some JS bindings for it (sort of x-posted in the JS forum), and so long as I’ve already done the work I figured I’d see if others would find it useful as well. Of course, if there are tall hurdles to getting Spine integrated into the extensions package, then it’s sort of a moot point.

Randy Chung, sounds cool! Maybe you have a link I can put on my runtimes page?
http://esotericsoftware.com/spine-runtimes/

@Nathan it’s not a separate runtime, but rather some JS to C++ bindings. It all runs off the cocos2d-x runtime, so fixing those memory leaks will help the JS portion as well :wink: The amount of work necessary to make things work was fairly minor (though one step up from trivial), so it’s more a matter of whether Spine gets included in the cocos2d-x package than anything.