Upsinn Posted February 15, 2016 Share Posted February 15, 2016 Hi, any idea how I can improve performance of frame animations? I have a scene with about 100 small animations in loop (each having 20frames). I thought replace group of animations by one bigger, so for example instead of the original 100 50px*50px animations I had 4 250px*250px. Is it good idea? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 15, 2016 Share Posted February 15, 2016 Animation itself doesnt cost you anything. Are you using one file per all animations, one file per every animation or one file per frame? Quote so for example instead of the original 100 50px*50px animations I had 4 250px*250px. Please explain it. In my experience, 100 animations of 50x50 works good even on canvas renderer. Quote Link to comment Share on other sites More sharing options...
Upsinn Posted February 15, 2016 Author Share Posted February 15, 2016 I have one file per one animation (20frames). In my scene are a lot of others things but in profile it looks like animations cost unnecessary amount of CPU, but maybe I do not understand CPU profile very well. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 15, 2016 Share Posted February 15, 2016 Ok, first - change frame of sprite is very cheap operation, so animation itself doesnt cost you anything. However, webgl optimization will work only if sequences of sprites you draw have the same base texture. I suggest to use shoebox (free) or texturepacker (paid) to compile all your frames into one atlas. Quote Link to comment Share on other sites More sharing options...
Upsinn Posted February 15, 2016 Author Share Posted February 15, 2016 ok thanks 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.