isfuturebright Posted November 4, 2013 Share Posted November 4, 2013 Hi all! I'm trying to run a game setting the resolution to 1280x720, but it's like it's limiting to 960x540. game = new Phaser.Game(1280, 720, renderType, 'gameContainer');//In the menu statethis.game.add.tileSprite(0, 0, 1280, 720, 'background');If I change the height set for tileSprite to 540 I'll be able to tell the difference, but setting the width to 960 changes nothing to the background. Any ideas? Link to comment Share on other sites More sharing options...
isfuturebright Posted November 4, 2013 Author Share Posted November 4, 2013 Nevermind. I got it work by doing this:<div id="gameContainer" style="width:1280px; height:720px;"></div>I had to manually add it to the gameCointainer's div. Link to comment Share on other sites More sharing options...
beeglebug Posted November 4, 2013 Share Posted November 4, 2013 There isn't a maximum size hard coded into the engine, so i'm not really sure what was happening there. When you say it was limiting to 960x540, was the actual canvas element being resized to those dimensions, or was it the gameContainer element which was cropping the canvas? Do you have an example somewhere where I look at the DOM? Link to comment Share on other sites More sharing options...
isfuturebright Posted November 4, 2013 Author Share Posted November 4, 2013 There isn't a maximum size hard coded into the engine, so i'm not really sure what was happening there. When you say it was limiting to 960x540, was the actual canvas element being resized to those dimensions, or was it the gameContainer element which was cropping the canvas? Do you have an example somewhere where I look at the DOM? It was like the Phaser Game had only 960x720. Setting the height through Phaser was working but not the width. I latter tried making the height 1280 and it worked, but somehow changing the width did nothing past 960. I wasn't setting anything on the gameContainer or on the body, but when checking the elements it said the body had 960x540, weirdly cause it was rendering phaser 960x720. So I tried setting the body's width to 1280px and it worked. Then I decided to try and set the gameContainer to 1280px and it worked as well, so I left it there. Link to comment Share on other sites More sharing options...
rich Posted November 4, 2013 Share Posted November 4, 2013 Very strange, there's nothing in the code that will limit the resolution of the game. Without a test case this will be hard to test one way or another really. Link to comment Share on other sites More sharing options...
Recommended Posts