Jump to content

Keysim
 Share

Recommended Posts

Hi,

I'm a beginner with phaser, and I like using spine for my animations. The problem is that I can't find a good tutorial or anything interesting where I can easly understand and configure it.

1st question : Can I load Skeleton Animations of spine into Phaser ? If yes, is there anyone who can explain it clearly to me ?

2nd : I clone phaser lib into Cloud9 (c9.io) but I don't know how to generate the javascript .min.. (I saw that there was a pixi lib for loading spine animations but I don't know how to use it...)

3nd : However, if there is no solutions for the skeleton animation, I tried exporting usual spritesheet with Spine, BUT... Spine export a .atlas file for the positions of the frames, NOT json or xml, the problem is that Phaser don't support it... Is there a solution ? I have a spritesheet with many animations, the json would be very usefull so I don't have to type every positions of sprites in phaser...

 

Thank you guys !

Keysim.

Link to comment
Share on other sites

Hello, Keysim! 

Phaser uses pixi-v2, spine plugin was embedded in it. It is out-of-date, so dont be surprised if your exported Spine animation wont work there. Lazer has no support of pixi.js.

There's no version of Phaser that works with pixi-v3 or pixi-v4, because @rich decided to drop it.

You can try to port https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-js on phaser.

As for API, it is the same for all spine runtimes: pixi, phaser, libgdx, pure js. 

Example of using it with pixi: http://pixijs.github.io/examples/index.html?s=spine&f=spineboy.js&title=Walking%20Animation&plugins=pixi-spine&v=dev

Up-to-date pixi-spine plugin: https://github.com/pixijs/pixi-spine

API overview: http://esotericsoftware.com/spine-using-runtimes

 

Link to comment
Share on other sites

There are various Phaser Spine plugins out there, here's a recent one: https://github.com/orange-games/phaser-spine

and a slightly older one: https://github.com/StudioKrok/PhaserSpine

There are also a number of Spriter plugins too, such as this one: http://phaser.io/news/2016/03/spriter-player

We don't use the Pixi v2 Spine plugin because they abandoned it a long time ago.

There is a build of Phaser that uses Pixi v3 internally, if you want to try it. It's unsupported, but you can find the branch in our repo.

 

Link to comment
Share on other sites

Hi again,

thank you for responding so quickly. So... I'm not really sure what's the best way, what do you recommend to do ?

This ? http://pixijs.github.io/examples/index.html?s=spine&f=spineboy.js&title=Walking%20Animation&plugins=pixi-spine&v=dev

Or orange-games/phaser-spine ? I just try it. It seems very good !

But, will I be able to do the hit boxes / and physical stuff of Phaser with it ? Do you maybe recommend something else than phaser in js that will work better with Spine animations maybe ? 

I buy Spine unfortunately...

Edited by Keysim
correcting
Link to comment
Share on other sites

13 hours ago, ivan.popelyshev said:

Spine is one of the best tools for animations, its much better than Spriter.

I suggest you to go orange-games repo and create an issue there, I really dont know much about them, except that I saw the code and it wasnt updated to spine v3 yet.

 

Thank you very much ! I hope I will find a way.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...