Following @manucorporat idea of using A8 textures for his game, I've just added "automatic" support for generating A8 textures:
Basically:
- If the image is an RGBA image then it will use the default pixel format (which can be modified using the CCTexture2D API)
- If the image is an RGB image, then it will use the RGB565 pixel format, ignoring the default pixel format (a CCLOG() message appears on the console)
- If the image is a grayscale image, then it will use the A8 pixel format, ignoring the default pixel format (a CCLOG() image appears on the console) <--- NEW BEHAVIOR.
Before, grayscale images were using the default pixel format (16-bit or 32-bit textures).
A8 textures are 8-bit textures.
When should you use A8 textures ?
- Particles
- Bitmap Labels (in case they only have just 1 color)
- Specific games like Geometry Wars games where the sprites only use 1 color
A8 textures are a bit slower than PVR textures, but are faster (and consumes less memory) than 16-bit and 32-bit textures.
How to generate grayscale images ?
1. Open your image with your favorite editor
2. Image -> Mode -> Grayscale (this works on GIMP)
Please, see v0.99.1 performance tests:
http://www.cocos2d-iphone.org/wiki/doku.php/perf_test:0_99_1#particle_tests
If you don't like this behavior, please, let us know ASAP. This feature will be part of v0.99.1 which will be released really soon.