Jump to content

Game not resize when resize browser


Recommended Posts


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.


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?56f70aea65aa3_Screenshot2016-03-2619.08.56f70af9b0fa8_Screenshot2016-03-2619.08.


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...