Jump to content

Why is this happening? Images become very pixelated.


arseniy
 Share

Recommended Posts

Hello,

 

Why is this happening and how to solve this?

When the screen size is big the images become pixelated like if they was stretched from small size. When the screen resized to some "normal" proportions the images look good or OK.

Is there a way to make that Phaser does not make the images small and stretched on different proportions?

 

Screenshot on wide screen with pixelated image:

http://data2.floomby.com/files/share/11_9_2015/16/yF7wKfNlECuROBACSl8w.png

 

Screenshot on narrow screen with OK image:

http://data2.floomby.com/files/share/11_9_2015/16/sD0c4pQJykiBHjJxwhBYSg.png

 

 

Thanks

Link to comment
Share on other sites

Looks like you make the canvas have a fixed resolution (in pixels), and that the canvas is set to fill the screen regardless of aspect ratio, then that you draw the letterbox bars onto the canvas. You thus have a lower effective resolution left for the game when there is letterboxing.

If you want to have a fixed canvas resolution then ensure the canvas's aspect ratio is preserved and don't draw the letterbox bars on the canvas (let these be outside of the canvas and get draw with the background of the containing HTML element or similar).

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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