Sprite Sheets in Cocos2D

This morning, I decided to learn how to animate sprites using sprite sheets in Cocos2D. I did a quick google search and discovered this excellent tutorial:

How To Use Animations and Sprite Sheets in Cocos2D | Ray Wenderlich.

Before you too attempt to tackle this tutorial, I’ll provide a couple gotchas that got me and you can avoid:

1. This entry helped illustrate Ray’s post.
cocos2d wiki entry for animation

2. I had to patch Cocos2d’s class: CCSpriteFrameCache as described in this article as I was getting a format compile error: ‘cocos2d: WARNING: format is not supported for CCSpriteFrameCache addSpriteFramesWithDictionary:texture:’ and this article points how to add the additional format 2 setting:
zwopple integration patch for cocos2d

Other than that, it was a straightforward process and it took me about 3 hours to finally see my animated sprite but that was mainly do to research time. In the future, it should take me about 5 minutes to setup a sprite sheet and introduce it to my project.

Zwoptex: After reading Ray’s recommendation, I purchased this software for $24. My current plan is to use Flash to draw and animate the assets, texture them in Photoshop (just to change up the art style so they don’t look all pure vector), and then finally bring them into Zwoptex to create the necessary png sprite sheet and plist files.