guy Posted March 19, 2015 Share Posted March 19, 2015 Hi ! I'm having a weird problem when trying to use animations.I have created a sprite sheet texture using http://www.leshylabs.com/apps/sstool/. I'm loading it in the preload stage:game.load.atlasJSONHash('bat', 'media/assets/bat_sprite.png', 'media/assets/bat_sprites.json');The problem i am encounter is a mad fps drop (from 60 to 10-9 fps) when adding a sprite from the atlas. First i thought its related to the animation being played, but after some debug i found out that:this.bat = game.add.sprite(380, 350, 'bat');is enough to have the fps drop, even before adding and playing the animations I'm attaching the sprite png. Thanks alotguy Link to comment Share on other sites More sharing options...
rich Posted March 19, 2015 Share Posted March 19, 2015 I honestly don't believe the fact it's using a texture atlas is related to the fps drop. Sometimes it can be, if the atlas is massive for example and blows up Safari memory, but yours is tiny (although it could be being added to a game already overflowing with assets I guess). I'd suggest creating an entirely blank project / game with JUST your bat sprite in it and see what happens. My guess is it'll work fine - which will help you narrow the issue down to something else in the game at least. Link to comment Share on other sites More sharing options...
guy Posted March 19, 2015 Author Share Posted March 19, 2015 Yeah I will try to debug it in blank project too From what I'm seeing now when I save it as web-app and launch it from homescreen the perforemnce is really bad (10fps)but running it from safari thought its around 60. Any ideas? i'm going crazy Link to comment Share on other sites More sharing options...
Recommended Posts