Jump to content

Canvas Resolution vs. Device Resolution (or: How to get the full resolution on mobile devices?))


Xellpher
 Share

Recommended Posts

Hi,

I've read quite a few posts on the forum but didn't really find an answer, so if it has been answered elsewhere I'd be happy to get a link.

I'm currently trying to make a game using Intel XDK and Phaser (I'm new to both, though). The game will be pretty simple and mostly static, basically a board game on a mobile screen. I'm using the CANVAS renderer, and I'm drawing directly to the canvas (no sprites, no images, just drawing primitives). There are no issues with different screen sizes or aspect ratios, as the game scene is calculated to fit into any ratio and size. Phaser will basically only be used to handle the setup, level loading and stuff (yeah I guess I could ditch Phaser and make a pure canvas game, but Phaser seemed to make it easier to get into mobile development).

I noticed that the canvas size is only half of the device size, which seems to result in blurry lines and jagged edges on my device (Nexus 5) and even in the emulator of XDK. Due to the game being static, I don't expect any performance issues with full HD resolution. So my questions are:

  1. Is there a way to set the full device resolution to the canvas?
  2. Is there a way to control render updates etc? I don't need 60 render cycles per seconds on a static scene with nothing moving, I'd prefer updating the scene on demand (after something actually changed).

Thanks!

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...