Resolution Factors on Mobile
nicoX

Gio,

 

I'm trying to optimize my game, and I've noticed that I can get a nice speed up by setting a low resolution factor (I use 0.6 at the moment). This causes the game to be rendered at a lower resolution, so it doesn't look as nice. But on mobile, it isn't a big deal - the screen is small, and you can't see a lot of detail anyway. On desktop though, it's very noticeable. But the good thing is, on desktop I don't need to optimize much, the game is pretty fast as it is, at full resolution.

 

So I'd like to know if it's possible to change the resolution factor on mobiles only. Something like wade.setMobileResolutionFactor(). Does something like that exist, and if it doesn't, is it something you could add?

 

Cheers

 

Nico

1 Comment
Gio

Hi nico

 

Currently there isn't a way to do that, but you could detect whether it's a mobile browser by looking at the useragent (see an example here), and set the resolution factor accordingly.

 

However, I would suggest that you base your resolution factor on performance rather than looking for a specific type of device. For example, measure the time between two updates and if it's too long switch to a lower resolution factor.

Post a reply
Add Attachment
Submit Reply
Login to Reply