A sprite sheet is two things: a PNG image containing all your frames packed together, and a data file that tells the game engine where each frame lives inside that image. Two JSON structures have become the de facto standards: TexturePacker JSON Hash format and Cocos Creator SubTexture array format.
The TexturePacker JSON Hash format uses a JSON object where each frame's filename is the key. This makes it trivial to look up a specific frame by name — you simply access frames["character_walk_01"] to get that frame's rectangle, rotation, and trim data.
This format is ideal for engines that load frames by name, such as Phaser, PixiJS, and Unity. The hash structure provides O(1) lookup time, which is useful when building animation sequences that reference frames by name.
The Cocos Creator SubTexture format uses a JSON array where each frame includes a filename field. This format is better when you need to iterate over all frames in order — for example, when building an animation sequence programmatically by stepping through the array index.
Cocos Creator, Cocos2d-x, and some other engines prefer this format because their animation systems work with indexed frame sequences rather than named lookups.
Both formats share the same essential fields that describe how to extract each frame from the sprite sheet image:
frame — The rectangle (x, y, width, height) that defines the frame's position within the sprite sheet image.
rotated — A boolean indicating whether the frame is rotated 90 degrees clockwise within the sheet. Engines must counter-rotate when rendering.
trimmed — A boolean indicating whether transparent borders were cropped from the original frame.
spriteSourceSize — The offset (x, y) and dimensions (w, h) to restore a trimmed frame to its original size. The engine draws the cropped content at this offset.
sourceSize — The original full dimensions of the frame before trimming.
For Unity and Phaser, use TexturePacker JSON Hash. The hash format allows direct frame lookup by name, which these engines expect. For Cocos Creator and Cocos2d-x, use the SubTexture array format. The array structure supports indexed iteration for animation playback.
Game Sprite AI supports exporting in either format. Simply select the format in the Export step, and both the PNG and JSON will be generated correctly. The format can be changed at any time without re-processing the frames.