Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Thanks! I've gone with that kind of option. I put several "bitmaps" into a PNG and for now when alpha != 0 I know there's a coin there. I then load different sections of the PNG like a sprite sheet, but I had to write my own code to handle that.
Just to note, I noticed that with this method the best way to fade out the fire was to make it reduce to zero size, since decreasing alpha causes it to fade into white.
Thankfully that's out of my hands with cocos2d. The draw is called as an opengl draw function and all drawing must reside there only. Anything like moving objects etc are all in the update method, which gets passed the dt.
I figured I only need two "GradientFill" sprites and I can load the nextState texture and fade into the current state, then unload the old state and load the next etc.
Thanks David, I was thinking along the same line, but I'm still unsure how to easily set colours. The gradient I have defined above is split into sections, but I could conceivably split them into less or more, meaning I would complicate going from 4 colours to 3 colours etc.