Jump to content

Performance on Mobile


scutajar
 Share

Recommended Posts

I have this weird issue when running on tablets. I have a simple if statement to detect whether the game is running on a desktop or on a mobile device, and to scale down the game accordingly (2048 x 1536 for desktops, and 1024 x 768 for mobile devices).

 

On desktops, this works fine. On a tablet however, there is a couple of seconds of delay before loading the preloader screen, and the wait is quite significant. After that, everything works smoothly, it just seems to be something in the boot screen (where I'm doing nothing except loading a background image and 1 out of 4 possible loading bars). I've tried setting it so that it runs in Phaser.CANVAS on mobile devices and Phaser.WEBGL on desktops, but this doesn't seem to have solved the problem (I end up waiting on a blank screen instead of a black box).

Any ideas? I'm using the same background for both desktops and mobile devices (ie: 2048 x 1536 large). I'm guessing it might be the cause of the problem, but I figured that since it was only 226kb, it shouldn't really that more than 10 seconds to load.

Link to comment
Share on other sites

2048 x 1536 is a huge image to load on mobile (the file size is irrelevant, it's the amount of memory it takes-up once loaded that is the issue). That won't even load on older phones / tablets. However to see if that's the issue why not just remove that screen entirely for now and then time it? If that speeds it up, then you know the problem. If it still lags without that screen in place, something else is up :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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