Jump to content

Pixel Art Blurry


liquidpenguins
 Share

Recommended Posts

Hey all,

 

I'm trying to import my pixel art background images into Phaser, and no matter what non-smoothing code I put in there, there is still a blur on these images. I hope someone can help out.

 

Here is a comparison between what it should be and what it is:

post-18085-0-27085300-1451416634.png

 

Here is the code I use:

var height = 480;var width = 852;var game = new Phaser.Game(width, height, Phaser.CANVAS, '', { preload: preload, create: create, update: update }, false, false);function preload() {     console.log('Preload') ;    Phaser.Canvas.setSmoothingEnabled(game.context, false);    game.antialias = false;    game.stage.smoothed = false;    game.load.image('background', 'assets/imgs/dgtd_bg.png');    game.load.image('props', 'assets/imgs/props.png');    game.load.image('people', 'assets/imgs/people.png');}function create() {     console.log('Create');    var background = game.add.sprite(0, 0, 'background');    background.smoothed = false;    var props = game.add.sprite(0, 0, 'props');    props.smoothed = false;    var people = game.add.sprite(0, 0, 'people');    people.smoothed = false;}

Any ideas what may be going wrong? 

Thanks!

Link to comment
Share on other sites

Are you testing through a browser? Is there any scaling happening? Same case for all browsers? e.g. browser at 100% zoom

 

Might be a idea to set this up in jsfiddle or something with the pixel images (or other placeholder pixel images that represent the same without giving away your graphics) so we can play with it and see. 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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