Titus Posted August 21, 2017 Share Posted August 21, 2017 Hi Guys, I'm currently making a game and I've run into a bit of an issue with one of the states that is loading multiple animations. There are 5 animations in total that play as soon as the state loads. They also loop. The problem that I'm having is that the state with the animations is taking around 5+ seconds to load, even though the spritesheets have been loaded in the Preload State. I feel this might be because the animations are being set so 60 FPS. I would prefer it if I could add this extra loading time to the Preload State if possible (because it has a loading bar) so I was wondering if there is a way to create the animations in a previous state and then have them play instantly on the page I need them to. Any help would be appreciated. Link to comment Share on other sites More sharing options...
Skeptron Posted August 21, 2017 Share Posted August 21, 2017 I assume you're using Spriter or something like that, so you have gigantic atlases. One solution to have perfect 60fps-fluid animations and very small load times (and also smaller runtimes) is to use a tool like Spine. Link to comment Share on other sites More sharing options...
Titus Posted August 22, 2017 Author Share Posted August 22, 2017 @Skeptron Thanks for the reply. I used Texture Packer to create the spritesheets and they are quite large (Around 8000 x 5000). There are 5 animations on the page that play for 5 seconds (@60fps) on a loop so each spritesheet has 300 .pngs. It is probably just overkill but I was hoping I could somehow add the animations in the preload state and pass them through to a new state so the additional time required to create the animations would have a progress bar. I've very new to Phaser though so I have limited knowledge. I've had a quick look at Spine but I don't think that would be what I'm looking for. I might just have to bump the framerate down and have smaller spritesheets. Link to comment Share on other sites More sharing options...
Recommended Posts