EXAMPLE
STEP 1
I found the following sprite sheet online.
STEP 2
I can’t use the above sprite sheet as is because it doesn’t have the
required LibGDX data file with it.
While it would be possible to recreate the data file manually, that
would be pretty tedious. It’s a
better option to use a tool to reconstruct the sprite sheet – however that
tool requires that all images be in their own file.
STEP 3
So I’m going to break the sprite sheet apart. Again, I could do that by manually
cropping out each sprite one at a time but that would also be tedious. So I will use SpriteCutter2.
STEP 4
Using SpriteCutter2, I now have my sprites in individual files. Ask Mr. Campeau for help with
SpriteCutter2 as it is a little messy to work with it.
STEP 5
Using the software TexturePacker (Lite edition), I recreated sprite sheet
to work with LibGDx.
STEP 6
One little problem to deal with. In
the data file (nukeData.txt), all the images are given the same name. I went ahead and added their index number
to their name. There is probably a
way of working with the original file in LibGDX but I haven’t found it yet.
STEP 7
Now I simply copied both of the files to the assets folder and refreshed
that folder in Eclipse and I was ready to go!
|