I remember the very first time I tried out the Cocos2D game engine for the iPhone. This was less than a year after the app store had been opened, and I was very impressed by the demo projects that came with the engine. A couple of the features features that I really liked were those that allowed you to manipulate sprites in both shape and coloring.
I’ve come across a tutorial that demonstrates how to use the setColor method of CCSprite taking one character and effectively turning it into hundreds of different characters. Not too complicated, but an incredibly cool effect that can save a lot of time.
Here’s a screenshot showing one white game character colored to look like many different characters:
The tutorial is from Brandon Trebitowski and can be found here:
Dynamically Coloring Sprites
Brandon also shows you how to make those cute bitizens used as characters in his tutorial Creating and Customizing A Bitizen.
Some good tips if you are wondering how you can populate a game with unique characters.
©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.