Sign in to follow this  
Le Twitch

would it be more efficient to change tint colour or swap out multiple sprites?

Recommended Posts

there will be 2 sprites (they're just squares) and some text that constantly need to change colours. so would it be better to change the tint or use a spritesheet with the different coloured sprites? 

Share this post


Link to post
Share on other sites

Switching the sprite frame if using a sprite sheet or atlas is much faster than tinting, but you lose the flexibility of being able to tint to arbitrary shades. For what it's worth, tinting is still very fast in most cases; here's a demo I did of a possible future pixi/Phaser addon which redraws a BitmapText object and tints every character individually at full speed even running in canvas on a iPhone: http://rotates.org/phaser/bitmaptextcolor.htm

Share this post


Link to post
Share on other sites

Switching the sprite frame if using a sprite sheet or atlas is much faster than tinting, but you lose the flexibility of being able to tint to arbitrary shades. For what it's worth, tinting is still very fast in most cases; here's a demo I did of a possible future pixi/Phaser addon which redraws a BitmapText object and tints every character individually at full speed even running in canvas on a iPhone: http://rotates.org/phaser/bitmaptextcolor.htm

 

wow that's pretty cool. thanks for the help. you're always so helpful =]

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.