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;



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:


Landscape view:


(I can't see the bottom)

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



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.