Jump to content

Game get low fps and slow on some android devices (Like samsung galaxy note 3, samsung galaxy s2, hauewai etc..)


selvam
 Share

Recommended Posts

Hi Guys,

I am new to phaser and html5 but i know phaser is a good framework to develop a game in short period. But here i faced some performance problem while game running on mobile device browser.

I have developed one slot game with resolution of 960x540, here i loaded one texture atlas with all images (nearly 100 png images) without bg because bg attached to full screen by using of div tag. over all assets size is around 1 MB.

At the same time i loaded some other images and spirtesheets for paylines and symbol animation to show the win animation. 

Symbol animation spritesheet size is around 10 MB.

However the game get low fps and very low performance on some android devices like samsung galaxy s6, samsung galaxy note3, samsung galaxy s2 etc..,

Performance issue happened even i am not loaded symbol animation spritesheets which have 10 MB size.

Now this is very big issue for us to get game to stable version and productivity.

So, please guys any of you suggest me how to handle this situation.

 

Note: I have created spritesheets and texture atlas by TexturePacker tool with maximum size of (2048x2048)

 

Thanks in advance,

Selvam

Link to comment
Share on other sites

The main thing usually is that you have to use Canvas renderer not Webgl or autodetect. there are a lot of other things you have to keep in mind while using phaser( like: as few stuff in update function as possible or don't use p2 physics unless you really need to, etc.) or even just pure javascript( like: use multiplication instead of dividing --> 100 * 0.5 instead of 100 / 2, if you have a lot of certain objects then use prototypes etc. ). Also a thing I have noticed, Phaser is very good engine, but it really isn't the best for mobile, even though Phaser is built on top of PIXI( fastest html renderer for desktop and mobile ), then one thing you can do is turn to pure PIXI. Harder to develop on this one, but if your game has a lot of sprites and simple physics and needs to perform well on mobile then this is the way to go.

Link to comment
Share on other sites

thanks for you reply.

Yes we are using Canvas renderer only. Here we did not use p2 physics or like this on update function.

When we use large size of images (more than 750x600 approximately) suddenly FPS get low (like 50 => 42) around 8 fps to be reduced here.

Which way we need to load large size of images, as of now i loaded those images using game.load.image(id,path).

And one more clarification, can we unload the previous game level texture atlas completely when we switch to next level of game, 

Because in our game there is two bonus games available if i am enter into  bonus game 1 from maingame mean here i need to remove maingame assets completely from memory and load bonus game 1 assets. Then after complete bonus game 1 we get back to maingame here i need to unload bonus game 1 assets and load maingame assets. Is ti possible to reduce memory.

 

 

Link to comment
Share on other sites

I'm quite sure if you use Phaser built in state system for this then Phaser does this automatically, but if you don't the assets should stay in memory(I don't think that's the case though). It's hard to say more, if it isn't some really secret project then you could just show me the code in pm or skype, but if it is then write me a more detailed explanation on when what happens, show parts of code etc.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...