Example of Spine runtime for Codea uploaded to Codea Community

You will need to buy the Spline software for PC or Mac.

@JakAttak: 1) as @Briarfox said, the paid version of the tool can export a JSON data file that you can use with the runtime. 2) I’ve not done any performance testing, but yes, I think it probably performs well enough to at least have several skeletons animating at once.

@Luatee: The paid version of the tool can generate sprite sheets for you (you could also use TexturePacker), however there is currently no support in the Spine-Lua runtime for loading them; you’d need to write the code to handle that, which actually shouldn’t be too hard.

I have the Spine PC and I’m just wondering what I have to change to get a new animation with a different images to play

@JakAttack: Ah, okay. So this is a bit rough, hopefully features in the upcoming version(s) of Codea will make general asset loading easier:/

So, what I do in the Spine-Codea demo is basically take the json file that Spine outputs, wrap it with the long string operators ([[ ]]), and assign it to a global variable in a tab with the same name (see spineboy_json in the in the Spine-Codea demo). You can then use that to create and load a spine.SkeletonJson, which you can then in turn use to create a spine.Skeleton.

As for the images, by default skeletons use utils.getImage() for getting the image location; right now, it’s set to load from Documents. This can either be overridden for all skeletons by modifying/overriding utils.getImage() to load from somewhere else (like your Dropbox folder for example), -or- you can monkey patch the skeleton’s getImage() function to modify the loading just for that skeleton (if you look in the Spine-Codea demo, there’s a commented out bit of code in main that does just that).

EDIT: Also, if you haven’t already, I highly recommend reading the documentation on using the spine runtimes (http://esotericsoftware.com/spine-using-runtimes/). It is very informative, and gives a lot of great examples of what can be done with Spine.

@toadkick, thank you. I will look into it.

As an FYI, I did a simple sunflower animation where the images were pretty big., and with 10 skeletons in a table renderer, I get about 45 fps. 5-7 skeletons gave around 50 fps. 30 skeletons were near 30 fps. 50 were 15, 100 was 9 fps.

Image Size and skeleton scale didn’t matter.

Thanks @aciolino that’s good information :slight_smile: Out of curiosity, which ipad do you have?

Ipad3.

I’m very interested in testing this. But the runtime seems so be not complete. TextureAtlas’es is not even included. It seems like SkeletonData gets loaded and played but I see no images or anything on screen. Could anyone assist me?

(Sorry for bumping such an old thread.)