Skip to main content
Multipack splits sprites across multiple atlas sheets when they do not all fit within the configured maximum dimensions. Overflow sprites go into additional sheets named with an incrementing index suffix: atlas.png, atlas1.png, atlas2.png, and so on. Each sheet gets its own data file with the same naming pattern, except when using the Phaser 3 format, which combines all sheets into one JSON file.

Enable multipack

fastpack pack sprites/ --multipack
Enable via CLI --multipack or set in the project file. When no --multipack flag is given on the CLI, packing stops with an error if sprites overflow a single sheet.

GUI workflow

Open the Texture section of the settings panel and check Multipack. The project re-packs immediately. When the result has more than one sheet, all sheets appear side by side in the atlas preview. Pan and zoom apply to the entire group. Each sheet shows a Sheet N: W×H label. The sprite list includes frames from all sheets. Clicking a sprite on any sheet selects it.

Output structure

With 600 sprites that do not fit on a 2048×2048 atlas:
output/
  atlas.png      # first sheet
  atlas.json
  atlas1.png     # overflow sheet
  atlas1.json
  atlas2.png     # second overflow sheet
  atlas2.json
Sheet index suffixes start at 1 for the second sheet. The first sheet has no suffix.

Loading multiple sheets

Load each sheet separately:
await PIXI.Assets.load(['atlas.json', 'atlas1.json', 'atlas2.json']);

// Use sprites normally
const sprite = PIXI.Sprite.from('character.png');

Technical details

Sprites are sorted by area descending and packed into the first sheet. When a sprite does not fit in the remaining space, it becomes the first sprite of the next sheet. Packing continues on the new sheet from the overflow list. When --data-format phaser3 is used, only one JSON file is written (named after the first sheet). It contains a textures array with one entry per sheet, so scene.load.multiatlas() loads all sheets from a single call. Scale variants each run an independent multipack sequence, producing [email protected], [email protected], etc. when a suffix is configured.

Multi-pack with variants

When using multi-resolution variants with multipack, each variant may produce a different number of sheets:
output/
  [email protected]       # high-res sheet 1
  [email protected]      # high-res sheet 2 (more sheets due to larger sprites)
  [email protected]      # high-res sheet 3
  [email protected]
  [email protected]
  [email protected]

  [email protected]       # low-res sheet 1
  [email protected]      # low-res sheet 2 (fewer sheets, sprites are smaller)
  [email protected]
  [email protected]
Sheet numbering is independent per variant. The @2x version might need 3 sheets while @1x only needs 2.

Best practices

  • Set max_width and max_height to match your target platform’s texture size limits (commonly 2048×2048 for mobile, 4096×4096 for desktop)
  • Use power-of-two dimensions with size_constraint = "pot" for better GPU compatibility
  • Test that your game engine can load multiple atlas files before relying on multipack in production
The Basic packing algorithm does not support multipack. Use MaxRects or Grid if you need multipack functionality.
TexturePacker calls this “Multipack” and uses the same sheet numbering convention. Data files from FastPack load in the same way.

Build docs developers (and LLMs) love