Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Sharp Screen Scaling?


LividPixel
 Share

Recommended Posts

I'm working on a pixel art style game with Phaser and Typescript, and I was wondering how I would accomplish working in a 320x180 environment, and having it scaled up to 1280x720 (factor of four). I'd much rather be able to scale up the end result, rather than having to scale up each of my individual sprites.

 

I've tried putting the small dimensions into my game constructor and setting scale.scaleFactor to (4, 4), but that didn't seem to do anything.

 

None of the methods I've come across while googling seem give me my desired result. Any advice?

Link to comment
Share on other sites

Well, I do the same thing with my game. It's a bit of a pain, but what I do is have a global variable called gameScale that I used when I create all my sprites/images/etc. For sharp scaling, you can turn use

game.stage.smoothing = false; 

 which will make the scaled images nice and sharp.

 

There might be a better way, but this is the way all my games so far in Phaser work.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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