MonoPack – A lightweight sprite packer.

Posted by on February 28, 2014

What and why is MonoPack?

MonoPack is a simple, comprehensive, lightweight and portable pipeline oriented sprite / texture packer for web, game and software developers alike.

Right now MonoPack is a console-only application, oriented to streamline game and website development pipelines. It’s nature allows it to be automated via batch and scripting engines very easily. It is, as well, completely free for commercial and non commercial projects (contact me for more details)

It’s “page” oriented, meaning it will iterate through a given directory, including all matching images into the final atlas. It does not take into consideration sequential images (animations) nor grouping yet.

It’s always the same story, either the available tools are too slow, cumbersome or have multiple dependencies, they may be free but not functional or prohibitively expensive… The available commercial tools are fine but they’re on the slow end of the spectrum with features most devs will never need and so many lacking important features on their “free” versions that render them virtually useless.

A quick benchmark:

| MONOPACK REPORT | Contact/Author: http://gushh.net |
Directory: ‘warrs/’
Pattern: ‘*.png’
Amount of images: 2194
Atlas Dimensions: [2048, 2048]
Covered Area: 3155592
Total Area: 4194304
Packaging Efficiency: 75.2352%
Time spent: 702ms
Loading: 296ms
Processing: 78ms
Rendering: 265ms
Saving Data: 47ms
Saving Image: 16ms

The resulting atlas (scaled down for display purposes)

The resulting atlas (scaled down for display purposes)

Currently supported atlas formats:

The output is always 32bit with alpha channel (supported if your sprites have them, otherwise it can generate the alpha mask given a color-key, see the configuration file for more information or leave me a message and I’ll try my best to guide you).

Current output formats are:

  • PNG (32Bit)
  • BMP (Bitmap 32bit)
  • JPEG

Planned outputs on future versions: JPEG2000, TGA and RAW.

Planned features:

  • Output separate alpha channel < (being tested)
  • Scaling and Rotation of sprites < (mipmaps pseudo implemented)
  • Sequential grouping for animations
  • Image manipulation functions (contrast, sharpen, etc.)
  • Faster alpha key generator (currently not optimized)
  • Automatic atlas resizing (will be optional) < Done – It’s called AutoSize!
  • Multiple pages per directory (to be implemented)
  • Parameter for output path. < Done – Full parameter support through console.
  • x86 and x64 binaries. < Done

Bugs and (are?) Features

Feature requests and bug reports are welcomed and encouraged. If you would like to support further development of this tool, or if you’ve found it invaluable in your work pipeline, please consider a small donation. You can contact me or click directly on the Donate button.

Why is it called MonoPack?

Originally intended for the Monkey and Monkey-X community, Mono comes from Monkey in Spanish. The rest requires no further explanation! – Needless to say this application is open to all communities and everyone’s suggestions are welcomed.

Obtaining the goodies

If you’ve made it this far, it’s only fair I hand you over the download link:

Please remember: this is a beta version, open to the public for testing. Bugs may be found!  http://gushh.net/dls/monopackb9e.zip

Older versions:

http://gushh.net/dls/monopackb9c.zip

http://gushh.net/dls/monopackb8.zip

http://gushh.net/dls/monopackb7.zip

http://gushh.net/dls/monopackb6.zip

http://gushh.net/dls/monopackb5.zip

http://gushh.net/dls/monopackb4.zip

 

No hard limits imposed on the amount of sprites or alpha channel nonsense.

A Commercial and Freeware GUI is currently being developed.

Thank you for downloading and testing MonoPack!

Cheers,
Gus