Sign in to follow this  

Retina screen ugly graphics in Phaser

Recommended Posts

I can't get Phaser to display graphics nicely.

Here is my setup: = new Phaser.Game(this.settings.windowWidth, this.settings.windowHeight, Phaser.WEBGL, 'area', this, true, false);
this.sprite =, y, key);
this.sprite.update = this.update.bind(this);
this.sprite.anchor.setTo(0.5, 0.5);
this.sprite.smoothed = true;
var scale = (1.0/window.devicePixelRatio);
this.sprite.scale.setTo(scale, scale);
this.sprite.smoothed = false;

The graphics loaded here are 2x larger for pixelRatio 2.

The first screenshot is in desktop, and looks really nice.

Why is phaser so ugly on iOS? It's iphone SE.




Share this post

Link to post
Share on other sites

I think you need to either set GameConfig.resolution (although that seems buggy) or enlarge the game canvas and then scale down.

Also, if you use GameConfig.antialias=true, there's no need to set smoothed=true on any objects.

Share this post

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.

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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.