Dynamically change color of sprites
I need help please!
I am developing an iPhone game where there will be multiple sprites of different colors. These sprites are completely identical in form and animation, except for their color. So basically:
bad guy#1 is red with a black hat
bad guy#2 is blue with a black hat
bad guy#3 is white with a white hat
bad guy#4 is orange with a green hat
etc.
Problem:
There are 120 animations for the sprites and 10 different color variations. That would mean managing and coding 1200 sprite sheets if the process were done manually.
Additional Challenge:
It's not just about changing 1 color in each sprite because:
There are 4 colors that need to change on each sprite.
The portion where the color changes moves in the sprite.
Solution needed:
What would be the best solution to deal with this issue through programming. I don't want to have 1200 sprite sheets (i.e. 120 sprite sheets for EACH color variation). I would like to have the colors change dynamically.
Thanks!
|