PRSoluções Posted March 26, 2016 Share Posted March 26, 2016 Hi, Im trying solve a problem that i think be simple to a phaser expert dev. My multiplayer game is working nice, but when i resize the browser the game be smaller or blurred with black parts. I need resize browser and camera follow player on center and everything on tiled map stay at the same state if i reload on the new size. Example: 1 - If i start my browser at 800x600 everything will work nice at this resolution. If i resize to 1024x768, the images are blurred and black parts are showed. I need that it resize to be at the same state that if i open on 1024x768 2 - If i start my browser at 1024x768 everything will work nice at this resolution. If i resize to 800x600, the images scale down. I need that everything stay as i reload on 800x600. My starting code: var game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.AUTO); game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.scale.pageAlignHorizontally = true; game.scale.pageAlignVertically = true; game.scale.setScreenSize = true; Can anyone help me? Link to comment Share on other sites More sharing options...
VitaZheltyakov Posted March 27, 2016 Share Posted March 27, 2016 Use: <body onResize="window.location.href = window.location.href"> Link to comment Share on other sites More sharing options...
PRSoluções Posted March 29, 2016 Author Share Posted March 29, 2016 It will generate another problem. My game is a MOBA, the user will redirect and will be disconnected. Dont have another way? Link to comment Share on other sites More sharing options...
Recommended Posts