Jump to content

Is there a limit to the game resolution?


isfuturebright
 Share

Recommended Posts

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

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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