beeglebug

Phaser Pixel Scaler plugin

Recommended Posts

I spent some time at the weekend trying to work out how to scale my game up without losing the lovely crisp pixels, and eventually settled on the technique that Rich wrote about in this tutorial: http://www.photonstorm.com/phaser/pixel-perfect-scaling-a-phaser-game

 

I thought this was a nice solution, so I ported the code to a Phaser Plugin to make it super easy to use. All you do is initialize it and it takes care of hiding the existing canvas, creating a new canvas and the relevant draw call to copy and scale the game.

 

You can find the plugin here if you want to to try it out (or contribute):

 

https://github.com/beeglebug/phaser-pixel-scaler

 

At the moment it just scaled the game by a fixed amount, but i'd like to extend it eventually so it can do full screen (similar to the existing ScaleManager).

 

Share this post


Link to post
Share on other sites

Hmmm, personally I think it's better where it is.

 

If it gets copied into that uber repo it just makes things confusing for people who want to raise issues or submit pull requests.

 

I don't see the problem with each plugin having it's own repo, it's how the rest of the open source world works.

Share this post


Link to post
Share on other sites

Hey, thanks for making a proper pixel-scaler for Phaser! I'm just getting started with Phaser, & still learning about its features. Can you briefly touch upon how this method is different from the "Pixelation" feature that's built-in to the underlying Pixi.js framework? Thanks!

 

PickPacket

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.

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.