Using the GUI
The fastest way to get started is with FastPack’s native GUI interface.Launch FastPack
Start the GUI by running the command with no arguments:The GUI window will open with an empty project.
Add sprites
- Click “Add Sources” or drag and drop a folder containing your sprite images
- FastPack supports PNG, JPEG, BMP, TGA, WebP, and TIFF formats
- Your sprites will appear in the collapsible sprite tree with thumbnail previews
Configure settings
Adjust packing options in the settings panel:
- Max dimensions: Set atlas width/height limits (default: 4096x4096)
- Trim mode: Choose how to handle transparent borders
- Pack mode: Select Good (balanced) or Best (densest)
- Data format: Choose your export format (JSON Hash, Phaser 3, PixiJS, etc.)
Preview and pack
- View the real-time atlas preview as you adjust settings
- Click “Pack” to generate your atlas
- Choose an output directory when prompted
Enable Watch mode in the GUI to automatically repack your atlas whenever source files change.
Using the CLI
For automation and CI/CD workflows, use the command-line interface.Basic packing
Pack a directory of sprites with default settings:output/atlas.png— The packed texture atlasoutput/atlas.json— Frame data in JSON Hash format
Pack with custom options
Customize the packing process with command-line flags:Using project files
Create a project file to store your configuration:Edit the project file
Open
atlas.fpsheet in your text editor and customize the settings:atlas.fpsheet
Project files are in TOML format and provide a clean way to version control your atlas configuration. Learn more in the Project files documentation.
Watch mode
Automatically repack your atlas when source files change:Watch mode is perfect for development workflows. FastPack monitors the input directory and repacks whenever you add, modify, or remove sprite files.
Advanced CLI commands
Split an atlas
Extract individual sprites from a packed atlas:- Recovering original sprites from a packed atlas
- Converting between atlas formats
- Extracting sprites from third-party atlases
Multi-resolution variants
Generate multiple resolution variants of your atlas:atlas.fpsheet
[email protected]and[email protected][email protected]and[email protected][email protected]and[email protected]
Common options reference
Here are the most frequently used CLI options:| Option | Description | Default |
|---|---|---|
--output | Output directory | output |
--name | Base name for output files | atlas |
--max-width | Maximum atlas width in pixels | 4096 |
--max-height | Maximum atlas height in pixels | 4096 |
--pack-mode | Compression effort: fast, good, best | good |
--trim-mode | Transparent border handling | trim |
--allow-rotation | Allow 90° sprite rotation | true |
--shape-padding | Gap between sprites in pixels | 2 |
--border-padding | Padding around atlas edge | 2 |
--data-format | Export format: json-hash, json-array, phaser3, pixijs | json-hash |
--texture-format | Image format: png, jpeg, webp, dxt1, dxt5 | png |
--detect-aliases | Deduplicate identical sprites | true |
Example workflow
Here’s a complete example workflow for packing game sprites:Troubleshooting
Sprites don’t fit in atlas
If you see errors about sprites not fitting:- Increase
--max-widthand--max-height - Use
--multipackto split across multiple atlases - Reduce sprite sizes or use fewer sprites
- Try
--pack-mode bestfor better density
Texture bleeding
If you see color bleeding between sprites at runtime:- Increase
--shape-padding(default: 2) - Increase
--border-padding(default: 2) - Use
--extrude 1to duplicate edge pixels
Watch mode not detecting changes
If watch mode doesn’t repack on file changes:- Ensure the input path is correct
- Check file system permissions
- Try saving files to a new location (some editors use atomic writes)
Next steps
CLI reference
Explore all CLI commands and options
Project files
Deep dive into .fpsheet configuration
Export formats
Learn about supported data formats
Packing algorithms
Understand the different packing strategies