I've been working on my puzzle game
again, after a long hiatus, and am now writing to iOS/cocos2d-x rather than just working on the prototype I had implemented to Win32.
The way that you get sprite data into cocos2d is by including as a resource a sprite sheet image and a .plist file which is XML that specifies which sprite is where. Plists are apparently an old Mac thing -- I had never heard of this format. .plists describing a lot of sprites would be a chore to write by hand so there is a cottage industry of sprite packing applications.
I tried out one called
and liked it a lot -- except that it is crippleware; I need a few features that are only in the full version; plus I can't stand crippleware; and I think $30 is too much for something that I can write myself over the weekend. So I decided to write my own sprite packer over the weekend.
The result is pypacker, a python script:
source code here
. Usage is like
pypacker -i -o -m -p