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

 Share

  • Recently Browsing   0 members

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