One of the most requires features/support question I’ve been having is “Can I sort by name?”.
This feature was removed in the 1.0.0 series and doesn’t match the functionality of Flash and some may ask why?
The new layout algorithms do not pack sprites 1 by 1 always in the same order. The evaluate every single unpacked sprite for the next available spot and choose the best matching one based on a set of rules. They also do not always just pack new space instead they sometimes go back in the atlas and fill spaces that were left as gaps that would normally be wasted.
Mostly this is the reason I removed the sorting by name since it has relatively no use or reliability with any of the layout algorithms now.
Even still it is a very requested feature. Because of that I want a period of taking feedback as to -why- people want this feature. I need to know what the use of sorting by name is to figure out how to best implement it since it’s not as simple as the Flash version now. If you could kindly leave a comment on this post I’d be greatly appreciated.
I’ll probably get around to it in about 1-2 weeks as I’m currently busy on another project and plan to begin work on version 1.1 / 1.2 in the upcoming weeks.
-Robert

I think the reason I would like sort by name is the pesky cases when I have LARGE animations (ie. iPad) and they don’t fit on one sheet. Then to get the animation to work properly in Cocos2D I need to sequence the animations so I can run it as a single animation. Really what would be nice is just to have a way where you automatically bridge into a new Zwoptex sheet when you sort too many sprites for a 2048×2048. If this saved under one Zwoptex file, for example, named Animation. Then when you select to publish automatically number and generate the sheets, like Animation1.png, Animation2.png, Animation1.plist, etc. This would make large animations fast and easy.
We recently found a use for the “sort by name” feature in our latest project. Dealing with an animation studio and porting a flash game over to the iPad we encountered some very large animations. Since sprites on the iPad are generally much larger than on the iPhone we found our animations taking up 4 or even 5 2048×2048 sprite sheets. The way we got around this way fit as many sprites as we could on one sheet and then create a completely different sheet for the next set of sprites.
What would be awesome is if you had more sprites than fit on the the largest sheet(2048×2048) that it would automatically create a second sheet side by side with the first and automatically sorted the sprites onto 2 sheets. When you then press publish it add a number to the end of the published file(sheet1.png/.plis and sheet2.png/plist). This would save a ton of time, although we’ve only really encountered this issue when the animations are really really big.
Hope this helps
Cheers
Wouldn’t this be useful when creating sheets of tiles for use in an editor such as Tiled that indexes the tiles by number so that the tiles are guaranteed to be in the same order and the map doesn’t get screwed up if the tile sheet has to be changed?
I agree. Some external programs that latch on to sprite sheets may not have the capability to look up directly off the Zwoptex coordinates list.
-Robert
For me I think is better to take advantages of a sprite sequence. At least I can’t understand why this app can’t arrange sprites in that way. May be I am not using it as I have to do, but what I need is to know where each animation frame is. I am using CORONA SDK for iPhone apps. May be there is another way to take advantage of this app and CORONA SDK sprite.lua code
Regards,
Please refer to this video to understand the importance of name sorting order. http://www.youtube.com/watch?v=6w3n8ycCZDs&feature=related
Please consider that even if your algorithms are better, for game and easy declaration in LUA CORONA code, is critical that sprite sheet be on a sequence order, always in concordance with namesXXX.png That feature allow us to follow animation sequence as image names were generated, i.e. in the same order.
If we don’t have that, we have to see each sprite sheet to find and detect which frame is each one, to rebuild the correct sequence. I tried all your current algorithms and options and I can’t build the correct sequence from left to right top down.
Therefore by knowing its sprite size (W & H) I don’t care where each frame is inside the sprite sheet, because they will be following their sequence order, like ball0.png, ball1.png, ball2.png and so on, from left to right, from top to down and in my case all of them with the same square space. Easy as that!.
With current algorithm is impossible (imagine a sequence of 60 frames, that you can’t realize where they are or in which order they were organized in the sprite sheet) to get animation sequence in the right order.
Well, I hope this explanation clarify or justify the need of that feature.
Great work!
Flavio
Replying to all your messages Flavio,
I see Corono game engine doesn’t support trimming or rotation or most of the features of Zwoptex and understand it looks for them in order of name and width/height stepping.
-Robert
The reason I need sort by name feature is because of the way I create and load animations. When I create object animations eg. character I create them and put into one folder. Then I’m loading all frames from all animations and trim them alltogether so they have same dimensions. When exporting prepared frames all is saved as: char000.png to char100.png. Having all frames named the same I need a lookup code to say that for eg. frame from 10 to 30 is the walk animation. I have an automated solution that loads all types of animations knowing what the frame range is. Without sort by name feature order of frames will be lost and frame 10 to 30 could contain frames from different animations or would not be sequential.
Pawel I’m not entirely sure what you mean here? You should be able to use the coordinates.plist to look up any frame in the sprite sheet at any time.
-Robert
Hey Guys,
Sorry I didn’t catch like 5 of the comments in the approval system it didn’t send me an email. I’ve approved all them now and am collecting the feedback.