I am building a game where the sprite of a character changes to reflect the equipment applied to that character. To this end, I wanted to store the "pieces" of the character (such as weapons and armor, as well as features like hair and eyes) on different "layers" which are composited at runtime. I have been using Texplay to composite the images, but there has recently been a problem. When the images are composited, the colors become altered.
This is basically the code that I am currently using to composite the image.
@spritesheet.splice(subsprite, 0,0, :alpha_blend => true)
Where @spritesheet represents the image that will eventually hold the composited sprites, while subsprite is the hair, or clothing, or whatever.
The actual code can be seen on github
http://github.com/RavensKrag/eternity/blob/master/Animations.rbHere's a picture for reference. I have drawn both a "precomposited" version assembled in photoshop, as well as the version composited using Texplay.