Batzi Posted November 4, 2015 Share Posted November 4, 2015 Is there a way to detect the device's resolution on which the game is running? I'd like to scale things in my game based on that. For some reason, when I try my game on a different PC monitor, the height is not always the same so a black bar at the bottom is shown whenever I scroll the camera down. On my PC monitor, that bar isn't shown and it is limited to the edges of the map I am using. Link to comment Share on other sites More sharing options...
Get_Bentley Posted November 4, 2015 Share Posted November 4, 2015 Are you using scale manager? Could try something like this, unless I am misunderstanding the question... //scaling options this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; //have the game centered horizontally this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = true; //screen size will be set automatically this.scale.setScreenSize(true); chongdashu 1 Link to comment Share on other sites More sharing options...
Batzi Posted November 4, 2015 Author Share Posted November 4, 2015 Are you using scale manager? Could try something like this, unless I am misunderstanding the question... //scaling options this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; //have the game centered horizontally this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = true; //screen size will be set automatically this.scale.setScreenSize(true); Thank you! That helped a lot!! Now it is scaling properly based on the device I am using! Thank you again! Link to comment Share on other sites More sharing options...
Get_Bentley Posted November 4, 2015 Share Posted November 4, 2015 No problemo man! Just always stoked when I actually have a solution to an issue . Batzi and chongdashu 2 Link to comment Share on other sites More sharing options...
Recommended Posts