Spine FP Runtime


(Ricesteam) #1

I can’t seem to find the PM button nor do I want to thread jack anymore.

@AbelToy Can you send me a rough guideline of how I could integrate Spine’s runtime into FlashPunk? Since Spine has a generic AS3 runtime code available, I’m going try a stab at integrating the two solutions. I think my first step is to extend FP’s Graphics class containing Spine stuff which eventually can be used with FP’s Entity. However, I’m lost from there.


Sending Private Message
(Abel Toy) #2

Ooooh. If you have AS3 stuff already it’s easy.

You can use an Entity or a Graphic, it doesn’t really matter.

What I’d do is (pardon my vocabulary, not using Spine specifics here, maybe they call them another way), first of all extend Graphiclist to make a Spine sprite class (the one which would include the animations and everything). Then, you can add an Image to this list for each “part” of the Spine sprite, and you change the image properties for each Spine frame, according to the instructions you can read there.

So, you’d have to build a frame reader and keep track of each image to modify it, according to the animation instructions.

You could base your implementation on the AS3 runtime code you said. Instead of using the Bitmap class or the Sprite class, you’d use FlashPunk Images on your Graphiclist.

If you need more specific help, you can ask more questions indeed, and post your code if you need me to take a look. I’ll be happy to help you!


(Ultima2876) #3

Getting a library together for this would be fantastic for FlashPunkers. Something I will look into when I have some time.


(Zachary Lewis) #4

I believe @AbelToy already wrote something very similar to this for Spriter. You may want to look over that code before you start!


(Abel Toy) #5

reeeeeeeeaaaaaaaaaaaaally outdated, though… - it can help you getting started, but there’s lot of differences and optimisation issues :slight_smile:


(John Andersson) #6

Any news on this matter?


(Froom7) #8

So I followed this thread for a while and I’m also interested to see FP with a skeleton/animation integration. (Sorry if I annoyed someone for reviving this topic)

I see that a lot of game frameworks/engines already implemented Spine (or some other skeleton/animation tool). Since I had a little free time, I took the liberty to play around with Spine and Flashpunk. So I made a quick thingy just to test it out.

Here it is: http://www.fastswf.com/yP8lL1o

Nothing too fancy here, just implemented the assets and make it walk and jump. I used the official Spine AS3 library.

Also, just mashed the test app in 30 minutes. :stuck_out_tongue:

So is it possible for future Flashpunk builds? Or will there be performance issues since FP doesn’t use hardware acceleration? I’d imagine it’ll take a while to get it to optimal performance.


(Jacob Albano) #9

Due to Spine’s licensing terms, we will never be able to include Spine support in Flashpunk proper. Their license dictates that any Spine code (runtimes included) can only be used by people who have bought a Spine license. If Flashpunk included Spine code, only Spine license holders would be able to use Flashpunk. No thanks.

However, it’s entirely okay for a separate project to implement Spine animation support in the form of a Flashpunk graphic subclass, which users may download and include manually in their individual projects.


(Hussein Tammam) #10

Hey, this looks great! I probably wont be using spine in my current project but I was wondering if I could have a look at the source code. I really enjoy reading and learning from other programmers. :stuck_out_tongue:.


(Darrin) #11

It is very cool.

It looks like they have hooked it up to a bunch of game libraries. See this list. Am I missing something? Seems like we could do the same.


(Zachary Lewis) #12

What @jacobalbano is saying is that we shouldn’t include code in FlashPunk that only works with a paid application. The minority of FlashPunk users will use this functionality, and it would add bloat to the library that the majority of users would never have use for.

Writing and sharing an open-source implementation of Spine specifically for FlashPunk would be wonderful, but it shouldn’t be in the actually library.