Data format? What is this all about?

TexturePacker is a tool that creates sprite sheet for game engines, user interfaces or web. It is possible to create simple sprite strips or grid based layouts.

Assuming that all sprites have the same size it's easy to get a sprite's position using its index in the sprite list. This sprite sheet format is ok for tile maps but im most cases it's a waste of memory.

TexturePacker also allows you to create an optimized sprite sheet with irregular sprites.

TexturePacker can remove transparency, rotate sprites and create a much tighter layout. In this case you have to know where a sprite is located, how it's oriented and if transparent pixels were removed.

This requires a data format that can be loaded from your gaming framework. You surely don't want to maintain lists of coordinates in your game source code.

TexturePacker knows a big number of game engines and writes the specific format for that engine.

TexturePacker also comes with several generic data formats — that support all feature of TexturePacker and can be used with your own game engine.

Even if a game engine is not listed in TexturePacker's list it might already be compatible if it's using one of the generic formats:

  • JSON array
  • JSON hash
  • XML

You can also create your own data format — e.g. by directly exporting source code — if you are not happy with what's already available.