Ezelia Posted September 11, 2013 Share Posted September 11, 2013 Hi, I'm presently using a frame by frame animations for a game and want to replace it with Spine.I want to know if I will not have a performance problem knowing that I have many characters moving around (up to 30 characters per screen). since spine use rotations and this is relatively costy with canvas, can this affect the performance ? does Pixi use any caching for Spine frames to avoid rotating operations each frame ? Quote Link to comment Share on other sites More sharing options...
Chris Posted September 11, 2013 Share Posted September 11, 2013 Are you talking about ctx.rotate() ?I had no performance issues with using it heavily in the past. Quote Link to comment Share on other sites More sharing options...
Ezelia Posted September 11, 2013 Author Share Posted September 11, 2013 what do you mean with heavilyif I take my example : 30 characters with 8 rotations each I end up with 240 rotations per frame, and I suppose each rotation will need a save/restore context ... do you think that this will not cause performance issues ?I just don't want to invest in Spin animations if I know it'll not work Quote Link to comment Share on other sites More sharing options...
Mat Groves Posted September 11, 2013 Share Posted September 11, 2013 Hello! PIxi is optimised for rotations to a certain degree (haha) - sin and cos operations are cached. Also Pixi does not use save and restore context - it uses setTransform with a pre-calculated matrix so should be ok. Quote Link to comment Share on other sites More sharing options...
Ezelia Posted September 11, 2013 Author Share Posted September 11, 2013 PIxi is optimised for rotations to a certain degree (haha) - Nice one this seems good to me, I'll go for Spine then ... will require a lot of work for transition but the reusability of Spine is perfect for my games. Quote Link to comment Share on other sites More sharing options...
Chris Posted September 11, 2013 Share Posted September 11, 2013 Well, you aren't really rotating anything but the coordinate system. One would have to make a jsPerf but I doubt it to be very performance heavy. Quote Link to comment Share on other sites More sharing options...
Rudrabhoj Bhati Posted September 13, 2013 Share Posted September 13, 2013 what do you mean with heavilyif I take my example : 30 characters with 8 rotations each I end up with 240 rotations per frame, and I suppose each rotation will need a save/restore context ... do you think that this will not cause performance issues ?I just don't want to invest in Spin animations if I know it'll not work I thought Spine can generate animation in bunch of images? I I think I read it somehwere on there website. Then why not use the images it generate as normal frame based animation? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.