Zwoptex with powerful features, super turbocharged algorithms and an amazingly elegant interface sprite sheets.


How to use Zwoptex

Once there, Zwoptex opens, and you can start creating your sprite sheet.

The first step is to import images. Start by going to the menu File > Import Images (see Figure 6.5), and you see an Open File panel for you to navigate to the file(s) you want to import.

Import images into the sprite sheet

After you select your images, hit the Select button to load the images into Zwoptex. All the images you’ve selected will be placed at the top-left corner of the screen, as shown in follow:

Zwoptex imports the images in the top-left corner of the canvas.

Now that you’ve placed the images in Zwoptex, there are a number of ways to arrange the sprites on the canvas. Under the Arrange menu, you will find different options for laying out the sprites. Figure 6.7 shows the sprites having been laid out using the Complex By Width (no spacing) option.

Sprite options menu and arranged sprites.

You can do this manually by clicking any sprite and moving it to the position you want. You can also use the Modify menu to change the size of the canvas to fit your needs.

By default, Zwoptex trims transparent edges from the imported images. This can be a problem, however, if the image you imported will be used as a simple sprite sheet. These images need to retain their original dimensions or the calculations used to define the position of each sprite will be incorrect.

Within the Modify menu is the option to Untrim Selected Images. This should be used to ensure that the images are returned to their original size. This is not necessary if the image won’t be used as a sprite sheet.

Having arranged your sprites, you can then export both the image (texture) and the control file (coordinates). There are two options within the File menu that let you do this: Export Texture and Export Coordinates. Both options enable you to select the location where you would like the file(s) saved.

That’s it! You now have a sprite sheet image file and its accompanying control file.

1.jpg (82.6 kB) shawn, 2013-04-08 06:59

2.jpg (78.4 kB) shawn, 2013-04-08 07:00

3.jpg (74.8 kB) shawn, 2013-04-08 07:00


Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.