Recommended Posts

Hi everyone!, I've just started to use Phaser's framework, so I don't have enought knowledge about it. I did a game (test it here), it works well on pc's browser. The problem were when I tried to do it mobile friendly. I tried to do that (on boot's state):

 if (!game.device.desktop) {
   
    game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
    game.scale.pageAlignHorizontally = true;
    game.scale.pageAlignVertically = true;

    game.scale.refresh();
    }

 

When I test it in my phone (portrait mode) it works good . The problem is when I rotate the screen (landscape mode), it doesn't scale well(I can't see the bottom). 

Portrait view:

portrait.png.67971b403b575c2cff5353fa1244b7cb.png

Landscape view:

landscape.png.bace9de721b73fbd22480ef1f1441d71.png

(I can't see the bottom)

What is the problem ?? :wacko::wacko: 

Thanks!!

 

Share this post


Link to post
Share on other sites

In boot.js you've set some limits regarding the game scale:

game.scale.minWidth = 250;
game.scale.minHeight = 170; <-- lower this or delete the line entirely.
game.scale.maxWidth = 1000;
game.scale.maxHeight = 680;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.