Tag: texture packer

Tips #1: Cornerstone, AgileZen and Compressed Cocos2D textures with Texture Packer


I’m really busy this week, so this is not an article. I wanted to share some tips from what I’ve been dealing recently, that I found to be very useful.

Cocos2D pixel formats and highly compressed textures with Texture Packer

One of the games I’m working on has dozens of sprite sheets, and most of them are 2048×2048. That is a killer even for the iPhone 4 and iPad, and I can’t even consider older devices.

Consider using 4 Sprite Sheets at once that are 2048×2048 each and PNG: the game wouldn’t even run, because the consumed memory would be too big. Also, the loading times would be terrible.

What is the solution?

  1. Get Texture Packer.
  2. Group background images and other squared sprites in the same sprite sheet, choose the RGB565 pixel format, select “FloydSteinberg+Alpha” as the Dithering algorithm and export it as a compressed PVR texture (pvr.ccz). BINGO! The image looks the same as 32-bits pixel format, the file size is smaller than PNG, and the loading time is decreased from around 15s to 1s (at least with my 2048×2048 spritesheet!).
  3. For sprites with alpha/transparency required, you may use RGBA4444 + FloydSteinberg+Alpha for those with a few to no gradients, or even RGBA8888, but in both cases export them as pvr.ccz! Using RGBA4444 reduces the memory usage by half. For RGBA8888 you still have the same memory usage, but since it is pvr.ccz, at least the loading times are cut.The problem is that most of the times RGBA4444 looks bad, so you may give a chance to RGGBA8888 + PVR.CCZ.

To learn more about Texture Packer and Cocos2D textures, read How to Create and Optimize Sprite Sheets in Cocos2D with Texture Packer and Pixel Formats by Ray Wenderlich!

On the end: Texture Packer is probably the most important tool for a Cocos2D developer.

The real good Mac SVN Client: Cornerstone!

After I wrote the last article dealing with SVN, where I recommended Versions as the best Mac client, I received lots of suggestions in Twitter and in the comments to use Cornerstone. I decided to try it, and now I can’t even open Versions anymore. The only problem is buying another $59 license!

From a tweet I posted (that got retweeted by the developers of Cornerstone): “After using Cornerstone for some days, I can’t even use Versions anymore. It lacks everything and looks old. #svn”.

AgileZen and Lean project management

Got to know about agile lean project management yesterday, which lead me to meet AgileZen – probably the simplest project management system on earth, yet probably the most efficient.

You can read a good overview of AgileZen here: AgileZen for Solo Remote Development.

This post is part of iDevBlogADay, a group of indie iOS development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web site, RSS feed, Twitter.