g
Printer Friendly Version

editor  
BellaOnline's Digital Art and Design Editor
 

What is TexturePacker

TexturePacker is one of the most popular sprite sheet creators for game developers. One reason for this is the number of supported frameworks. As you can see from the list below, TexturePacker works with the most popular game development frameworks.

cocos2d iPhone
Gideros
LibGDX
Ogre with CEGUI
CoronaTM SDK
Sparrow
Moai
AppGameKit
Slick2D
Unity3D UIToolKit
LimeJS
CSS Sprites
JSON/HTML5

TexturePacker is packed with great features for optimizing stripe sheets.

Import and Export

One of the new features with version 2.4.0 and above is the ability to import Flash SWFs as long as they are simple frame animations. You can also import the usual formats including PNG, JPG, TIFF and BMP. Export formats are PNG, PVR, PVR.CCZ, PVR.GZ and JPG/JPEG.

Multiple Resolutions

With iPhone 4 and the highly anticipated high resolution iPad 3, most developers want to use textures for both resolutions. This can be time consuming if done manually. However, creating sprites for both high and standard resolution devices has been simplified with TexturePacker's automatic image scaling for both resolutions.

Algorithms

TexturePacker has two options for layout algorithms. For simple animation and tile maps, the basic algorithm will be sufficient. MaxRects is the best algorithm available and supports enhancements such as trimming and rotation. Only the paid version TexturePacker Pro supports the MaxRects algorithm.

Texture Size

Besides the layout algorithms, another factor in the optimization of sprite sheets is the size of the output file. TexturePacker will automatically use the minimum texture size possible based on the imported sprites. You can also set custom sizes if needed.

Trimming

Another way to reduce texture size and optimize your sprite sheets is to eliminate all non-essential transparent pixels. By removing the empty space surrounding a sprite, you can pack more sprites per sheet and reduce the number of sprite sheets loaded into memory resulting in faster rendering and better memory usage.

Color Reduction

You can reduce memory usage to 50% by color reduction. TexturePacker will also add dithering to the image, keeping the quality closer to the original, except for some graininess. This process works best for animated sprites because the graininess is less visible.

Alias

Identical images are registered but only one image is added to the sprite sheet. This allows you to use the duplicate images in the animation but saves valuable space on the sprite sheet.

Heuristic Mask

TexturePacker can convert the solid background color behind your sprites to transparent pixels. This allows the sprites to be packed more closely and a smaller file size.

Integration into Xcode build process

TexturePacker's built-in command line tool allows TexturePacker to internally update sprites during the build process. Because only sprites that have been changed are updated, you save memory.

Andreas Low is the developer of TexturePacker and PhysicsEditor. He has co-authored the book Learn Cocos2D Game Development With iOS 5.

http://www.texturepacker.com/

Join us in the Flash forum. | Join us in the Digital Art and Design forum.

|

Digital Art and Design Site @ BellaOnline
View This Article in Regular Layout

Content copyright © 2013 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.



| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2013 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor