Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README
----------------------------------------------------------------------------------------------------
The Sparrow Atlas Generator
----------------------------------------------------------------------------------------------------

The atlas generator is a Ruby script that arranges several images in one big atlas-texture. 
Using a textures atlas is important for the performance of your game, and it's very easy
to use it in Sparrow.

----------------------------------------------------------------------------------------------------
Installation
----------------------------------------------------------------------------------------------------

1) Requirement: "ImageMagick"

First, you need the command line tool "ImageMagick" (http://www.imagemagick.org).
The recommended way to install it is via the packaging system "MacPorts" (http://www.macports.org/)

After installing MacPorts, open a terminal and type:

  sudo port install ImageMagick

Now, go for a coffee, this will take a while ;-)

2) Requirement: "QuickMagick"

Now, we need a ruby gem that is used to work with ImageMagick. It is called "QuickMagick", and 
is installed the following way:

  sudo gem install quick_magick

3) Make the script executable:

To allow the script to execute, we need to tell OS X that it can be executed:

  chmod u+x generate_atlas.rb

4) That's it!

----------------------------------------------------------------------------------------------------
Usage
----------------------------------------------------------------------------------------------------

To find out how the script works, have a look at the help screen.

./generate_atlas.rb --help

Here is simple usage example:

./generate_atlas.rb input/*.png output/atlas.xml

Some options:

./generate_atlas.rb --scale 0.5 --padding 2 --sharpen --maxsize 2048x2048 *.png atlas.xml

Something went wrong with that request. Please try again.