Jump to content

Sprite & Button Scaling


Recommended Posts

I needed to make my sprites look much better than Phaser was rendering them by standard and upon discovering this weirdness I decided to double the size of all my PNG exports, and extend Phaser.Sprite and Phaser.Button to immediately apply a scale of 0.5 on instantiate.  This means I don't have to worry about scale when positioning like in this post and my in-game graphics look noticeably better.

Is there any downside, performance or otherwise, from doing this?

Link to comment
Share on other sites

I'm a big fan of measuring before making pronouncements about performance, so caveat poster.

You're sending 4x the number of pixels to the GPU since you've 2x the width and height. So you're using more memory. Don't know about any other effects that'll have off the top of my head.

Link to comment
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.


  • Recently Browsing   0 members

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