Example of Spine runtime for Codea uploaded to Codea Community

I don’t know how much interest there is here in the Spine skeletal animation tool (http://esotericsoftware.com/), but from what I’ve seen it’s pretty sweet. I decided to take a crack at hacking the official Spine runtime for Love, and it turns out it really wasn’t so difficult to get something up and running.

You can grab the project from Codea Community, and you’ll need to grab the images from https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-love/data and put them in your Documents folder (you can also put them in your Dropbox if you’d rather, see the comments in the code).

I’m probably not going to mess with this too much for a bit, but I may revisit it in a couple of weeks. I may take a crack at making it a little more Codea friendly. Plus I need to learn how to use the tool, it looks pretty awesome.

The Spine tool does indeed look awesome. I’m sure having the ability to import its animations will be really useful in Codea, so thanks for sharing the code, @toadkick.

I’m surprised how many assistive tools there are for aspiring game developers. With the likes of this, Cider and the Juice libraries, not to mention Codea itself, there are many ways to get started and learn how things work.

Looks really cool. Might check out your port soon I have a possible use for animations like this.

That is very nice. and runs quite smoothly on my Ipad 2. I wonder how it scales for more characters on screen.

@spacemonkey: I haven’t attempted any profiling yet, but if I had to guess I’d say that you’d probably be able to have quite a few characters animating like this. I’ve seen some areas that might benefit from some micro-optimization (using local references instead of globals, etc), but I don’t think that will make that much of a difference. Also, because of the use of parasitic inheritance, object creation is more expensive than it would be using Codea’s classes; on the other hand, it should be at least slightly faster to actually use the objects after they are created. I think memory usage might be the more pressing concern (again because of parasitic inheritance), but I’ll have to do some experimenting and profiling to find out. If any one else happens to do any benchmarking of their own, please let us know which device you were using and what your results were!

@toadkick thank you. This is awesome.

Even memory management may not be such an issue when you compare it to the traditional approach of big sprite sheets for frame based animation

@spacemonkey: That is a very good point :slight_smile:

This is excellent! I was looking for such a tool! How hard was it to port the code to work in Codea?

did you see this?

https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-lua

@aciolino: it wasn’t bad at all, it took me about 2 hours. Half of the work was modifying the runtime to put everything directly in the spine namespace, instead of using the require() function, so that it would work better with Codea’s tabs.

@matkatmusic: Yeah that was actually my starting point. The thing that was missing there was rendering code, so I borrowed the rendering code from the Love2D runtime, https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-love, (which is also built on the generic Lua runtime you linked to) and modified that to work with Codea, which was the other half of the work.

This looks great. Too bad they crippled save. It would be. Great tool if you could demo save for like 10 bones and 3 animations.

After seeing this running in Codea, I went ahead and bought the essential version (on sale still for $60). My initial impression is that I quite like it. Your mileage may vary, I am not exactly an artist (much less an animator). Even basic usage of this tool combined with the spine runtime opens up a lot of options when it comes to procedural animations, and even with my meager art skills there’s a lot there to play with. As far as usability, the tool strikes me as incredibly polished; there was a lot of love put into it.

The fact that it works on Mac, Windows, and Linux (the license allows for installation on 2 machines, for 1 user) is awesome. Also, as far as I can tell, there really isn’t another tool out there like this for 2D animation with a focus on games…especially not one as widely supported as this (seriously…they provide a ridiculous amount of runtimes and their source, and there are tons of unofficial runtimes). It was pretty simple to get this running in Codea, but it was even easier in Love2D.

On the other hand:

If you are an animator, you will probably really, really desire the “pro” features. Those include “ghosting” (a.k.a. onion skinning), “Auto Key” (ugh), and various other “advanced” (though some are a lot more like convenience) features. Unfortunately, those come with a much steeper price tag (normally $299, on sale right now for $250). Unfortunately it seems like it would be hard to tempt an animator to take a serious stab at the trial, when they’d essentially be throwing that time away since they can’t save any of their work. So yeah, I totally agree with you on that point @aciolino, it’s really lame that you can’t save at all with the trial. I would definitely be interesting in an actual animator’s impressions of this tool.

As an aside, I think some of these “pro” “features” seem kind of mean (namely, Auto Key and Ghosting). It goes without saying that the developers deserve to be paid for their work, but it almost feels like they are intentionally making the workflow worse if you aren’t willing to cough up the extra dough. I think the upcoming deformable polygon features alone would justify the more expensive price tag, I don’t see why some of these had to be excluded from the “essential” version.

To conclude: as a programmer, with next to no art skills, I am willing to spend $60-75 on the tool, and find it to be worth it if you are serious about using skeletal animations in your games in any form. However, I cannot give an honest impression as an animator, so unfortunately I cannot say whether it is worth it at any price :confused:

That is an excellent overview. I’m able to drop the 60 bucks on the tool as it looks like EXACTLY what I wanted later to IK and bones (I’ve written about those in the past), so it looks pretty exciting.

I’m thinking that rendering 15 or 20 characters and checking the frame rate is the only curious it’t I have left on this thing.

I agree that overall it looks fantastic.

Does this project require having Spine for your computer, or can it create animations?

Lua runtime runs animations in you app!

@JakAttak: Spine is a tool for your computer to create sprite-based skeletal animations. This project (Spine-Codea) is an example of using the runtime library that can play the animations that are created with Spine.

@toadkick, ah now I understand. I have downloaded the trial of spine to give this a try and see if I might be interested in purchasing spine. It looks to be a very useful program

@Toadkick it looks like my dream tool! Except I’d prefer to make all the sprites using the skeletal system then copy each one on to a sprite sheet, but you can’t save images! This might be possible with the trial version though if I screenshot each sprite on to a sprite sheet then discard the background colour… free skeletal image editor :wink:

Just loaded this from CC and ran it, this is amazing! I have a few questions though:

  1. How do I import my own animations?

  2. How processor-intensive is this? Is it plausible to have multiple animations like this running as part of a game?