Jump to content

Blurred images on iPhone


Go to solution Solved by jflowers45,

Recommended Posts

Hi guys,

 

I've been playing around with Phaser for the last couple of weeks and I'm really loving it, very easy to work with and fun too!

 

I have come across an issue however, I'm sure I'm probably doing something silly so I'm hoping someone can point me in the right direction.

 

The issue:

I come from a web dev background, so for my images, I've made them double the size and then using scale.setTo(0.5,0,5) to shrink them to the size I want them to display at. That's all fine, however when I use the game on my iPhone the images appear rather blurry instead of nice and crisp.

 

Can anyone point me in the right direction here, am I doing something wrong?

 

Thanks,

Martin

Link to post
Share on other sites
  • Solution

Quickest way for others on the forum to help is if you post an example of the problematic code+images on a web server so we can see exactly what you're talking.  First thought,  have a look at the scaling code that happens in Boot.js in the example template.  I personally created a 960x640 project, made the images the right size for that, and let Phaser scale as necessary

 

https://github.com/photonstorm/phaser/blob/master/resources/Project%20Templates/Full%20Screen%20Mobile/src/Boot.js

Link to post
Share on other sites

Thanks for your response, I managed to sort it  :D images look much nicer now!

 

I did the following to fix my issue:

  • Changed the dimensions of my game to 640 x 1135 (was half this beforehand)
  • Removed any scale.setTo(0.5,0,5)
  • Added game.stage.scaleMode = Phaser.StageScaleMode.SHOW_ALL;
  • Added game.stage.scale.setScreenSize(true);

Thanks for your pointer, much appreciated!

Link to post
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...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...