richpixel Posted December 11, 2014 Share Posted December 11, 2014 Pre v2.2 I always used scale mode SHOW_ALL like this: this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = false; this.scale.setScreenSize(true); On a desktop browser, this always kept my entire game in view, regardless of how small I made the browser - either height or width. Now my code looks like this: this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.scale.setMinMax(1024/2, 672/2, 1024*2, 672*2); this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = false; (The game parent is a div with no css attached to it) Now the game fills the browser width - scaling it up usually, and in order to maintain aspect ratio the height is also scaled up, meaning I have to scroll down to see the bottom part of the game. Pre 2.2, it used the 'minimum scale' in order to scale the game - ie. the height was smaller so it used that to determine a scale to be applied to both width and height. It appears that now it uses the maximum scale... When I resize the browser window width, the game rescales, but if I change the height it doesn't. Hoping there is a property or something easy to set to make it use the minimum scale again! Thanks a lot Link to comment Share on other sites More sharing options...
aurelien974 Posted December 11, 2014 Share Posted December 11, 2014 Hi! I noticed the same problem : it comes from the game parent, try without your div, just ' '. sharbelfs and richpixel 2 Link to comment Share on other sites More sharing options...
richpixel Posted December 11, 2014 Author Share Posted December 11, 2014 You're right - that gives the effect I'm looking for. I guess if there's a parent div you have to use css on that div to control things. Link to comment Share on other sites More sharing options...
spencerTL Posted December 11, 2014 Share Posted December 11, 2014 Took me a while to work this one out - wish this thread had come up 2 days ago! Link to comment Share on other sites More sharing options...
wheatbox Posted December 12, 2014 Share Posted December 12, 2014 Ah, thank you so much! I was having the same problem and had no idea where to look as a Phaser noob. Thanks!! Link to comment Share on other sites More sharing options...
Pedro Alpera Posted December 15, 2014 Share Posted December 15, 2014 Thanks! same problem here Link to comment Share on other sites More sharing options...
seejay92 Posted January 27, 2015 Share Posted January 27, 2015 Hi guys, I have had the same problem as you with this issue, since upgrading to 2.2.2. After alot of headbanging (as I needed to keep the parent container too) I've finally found the change needed to make it work. On your boot state, add the following line so the game knows to use the bottom of your screen as a contraint:-game.scale.windowConstraints.bottom = "visual";Hope this helps! Cameron aurelien974, buzzb0x, richpixel and 4 others 6 1 Link to comment Share on other sites More sharing options...
limion Posted August 2, 2015 Share Posted August 2, 2015 Hi guys, I have had the same problem as you with this issue, since upgrading to 2.2.2. After alot of headbanging (as I needed to keep the parent container too) I've finally found the change needed to make it work. On your boot state, add the following line so the game knows to use the bottom of your screen as a contraint:-game.scale.windowConstraints.bottom = "visual";Hope this helps! Cameron Cameron, thank you! You are my rescuer Link to comment Share on other sites More sharing options...
Recommended Posts