Wasyl Posted April 18, 2016 Share Posted April 18, 2016 Hi. I trying run my game on mobile devices and I've problem with scaling. This my code: this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.scale.minWidth = 320; this.scale.minHeight = 320; this.scale.maxWidth = Config.GAME_WIDTH; //You can change this to gameWidth*2.5 if needed this.scale.maxHeight = Config.GAME_HEIGHT; //Make sure these values are proportional to the gameWidth and gameHeight this.scale.pageAlignVertically = true; this.game.scale.refresh(); this.scale.updateLayout(true); In chrome devtools on start everything is ok, but when I run game on my smartphone nothing happen until I change orientaton. Any ideas? Link to comment Share on other sites More sharing options...
cardex107 Posted April 18, 2016 Share Posted April 18, 2016 Hello, this can help you to understand, how this work: http://www.emanueleferonato.com/2015/04/23/how-to-lock-orientation-in-your-html5-responsive-game-using-phaser/ Link to comment Share on other sites More sharing options...
Wasyl Posted April 21, 2016 Author Share Posted April 21, 2016 Great, now this works Link to comment Share on other sites More sharing options...
Recommended Posts