Jump to content

Multiple screen resolutions


RetardVeverca
 Share

Recommended Posts

Hi :)

 

What is the best way to support multiple screen resolutions and different aspect ratios on Android devices? (I am developing 2d game with CocoonJS)

 

I know you can scale it with idtkScale when working with CocoonJS, but that is not the perfect solution. 

 

Do you make highest resolution sprites and scale them down with game.scene.stage.scale.set ? And where can I find more about this function and others which might be useful like, hiresFactor, hires, retina and other properties of game.System class? 

 

Is maybe this the best solution? And how would I implement it properly in Panda.js?

 

Regards

Link to comment
Share on other sites

And do you define positions in % so the items will be positioned corectly? Is it maybe the solution in SVG graphics? Or do you develop in fixed resolution (1024 x 768 for instance) and scale based on detected resolution? I know many many questions .. :P I know there is millions of solutions (I've read many articles about this problem including android developers guidelines), but my main question is, what is the prefered way with Panda.js (with CocoonJS)? :)

Link to comment
Share on other sites

Ok, so this is done automatically by CocoonJS, thats great :) So basically I set it up with lets say 768 x 1024 for portrait mode and set game.System.idtkScale = 'ScaleAspectFill'; like the way it is done in flying dog demo, but this still leads to some part of the game not being visible on certain screens? If I set to 'ScaleAspectFit'  some parts are out of canvas (letterboxing) and 'ScaleToFill' stretches content of course. And if the fixed higher resolution is actually the solution, what is the most appropriate resolution for portrait and landscape mode respectively? And thanks for answer ;)

Link to comment
Share on other sites

Thanks enpu :) So if I set canvas and position elements like you suggested, is it best to set few different sprite dimensions for every object and select them with respect to game.device.pixelRatio or use max. dimension sprite and scale it down with resepect to game.device.pixelRatio?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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