Jump to content

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


Le Twitch
 Share

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? 

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

Link to comment
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 =]

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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