Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Spine runtime to spine-ts #11

Closed
AleBles opened this issue Aug 25, 2016 · 6 comments
Closed

Upgrade Spine runtime to spine-ts #11

AleBles opened this issue Aug 25, 2016 · 6 comments

Comments

@AleBles
Copy link
Member

AleBles commented Aug 25, 2016

blogpost: http://esotericsoftware.com/blog/spine-ts-released

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

@AleBles AleBles self-assigned this Aug 25, 2016
@AleBles AleBles added this to the phaser-spine v3 milestone Aug 25, 2016
@shibekin69
Copy link

Awesome! Pretty good plugin. I thought that spine wasn't supported in Phaser before stumbling onto that blogpost, and then this plugin. How's the mobile performance of Phaser + Spine + Intel XDK on a mobile phone for you so far?

@AleBles
Copy link
Member Author

AleBles commented Aug 26, 2016

It's pretty decent. We've released only one game with Spine assets, and the performance is not bad at all. There's always some room for improvement, but it was definitely playable!

@shibekin69
Copy link

shibekin69 commented Aug 27, 2016

I've given it a test run as well. On an octacore Snadragon 615 CPU, I take it it does about 30-40fps consistently without apparent stuttering while displaying the spineboy and raptor spine objects (without scaling them down) at the same time. Speaking of which, how do I destroy spine objects? I currently assigned them to one or two groups, then when I destroy them, I do:

objspinegroups[spinekey].destroy();
delete objspinegroups[spinekey];

It does remove them, but I'm thinking that removing them while they're still animating will still have the plugin compute for their animations despite them being removed visually. Is this the case?

And would you know if setting:

game.tweens.frameBased = true;

has an effect on spine's animation's timing? Because from what I noticed with Phaser, sometimes, when you need multiple tween animations using the built-in tweener to sync with each other, the frameBased timing must be enabled with a "visual performance" trade-off. And if it's disabled, the game's tween transitions appears smoother, but with the risk of going out of sync with each other. This "visual performance" degradation is more apparent in mobile phones.

@AleBles
Copy link
Member Author

AleBles commented Aug 29, 2016

the Spine object is an extend Phaser.Group so it has a destroy() method like everything else. It could be possible that there is a leak somewhere in destroying them, I didn't add any extra logic there.

As for the tween stuff, spine simply only updates x/y/rotation values based on what is done in the runtime. There are no Phaser Tweens active, so settings tweens to frameBased should have no impact on the Spine animation

@shibekin69
Copy link

Ah ok, so spine's animation is separate and doesn't use Phaser's built-in tweener in any way no?

And the destroy() function should clear up any spine animation on stage and/or running, freeing up memory and cpu as it should, correct?

@AleBles AleBles added this to To Do in Implement Spine-TS Aug 18, 2017
@AleBles AleBles moved this from To Do to Done in Implement Spine-TS Aug 21, 2017
@AleBles
Copy link
Member Author

AleBles commented Aug 21, 2017

This gist of it is done in the spine-ts branch, all the lingering issues will be picked up seperatly and we have the project page now to track progress

@AleBles AleBles closed this as completed Aug 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants