Jump to content

Supporting diffrent phone size


Eric Beaudoin
 Share

Recommended Posts

Hi, I am starting out in phaser and I had a question that I couldnt seem to get a clear understanding of.

I am creating a game in phaser and I decided that I want to make it as an app as well, but when I started coding it I quickly realized that there are a lot of different resolutions, ratios and also the multi orientations.

 

I was wondering what is the best way to approach uniform appearance without making the app bigger then it needs to be.

Should I make an image based on each ratios larges resolution used for a phone and scale down from there only loading the assets based on aprefix related to their ratio? Do I create images for each ration and for several resolutions (this way phones with less resolution do not have to scale as much). 

I was thinking if I do this last option, wont the app be bloated. How would I address this? Would the consumer have to download the app then it would download the needed images based on their phone settings (is this possible)?

 

And lastly I was wondering if any one can point me in a good direction for effectively changing the images and positions of things then the user switches from landscape to portrait and back. 

Link to comment
Share on other sites

17 hours ago, Eric Beaudoin said:

Hi, I am starting out in phaser and I had a question that I couldnt seem to get a clear understanding of.

I am creating a game in phaser and I decided that I want to make it as an app as well, but when I started coding it I quickly realized that there are a lot of different resolutions, ratios and also the multi orientations.

 

I was wondering what is the best way to approach uniform appearance without making the app bigger then it needs to be.

Should I make an image based on each ratios larges resolution used for a phone and scale down from there only loading the assets based on aprefix related to their ratio? Do I create images for each ration and for several resolutions (this way phones with less resolution do not have to scale as much). 

I was thinking if I do this last option, wont the app be bloated. How would I address this? Would the consumer have to download the app then it would download the needed images based on their phone settings (is this possible)?

 

And lastly I was wondering if any one can point me in a good direction for effectively changing the images and positions of things then the user switches from landscape to portrait and back. 

Welcome to the community. 

You should read through this topic here as it is a good place to start:

Another approach would be http://phaser.io/examples/v2/display/viewport , but it depends on your type of game. Viewport is the easiest to implement as you simply change the view size and not anything on the screen. A tetris type of game would have to use resizing while a platform game could do with viewport.

 

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...