Projects > Other Projects

Spritesheet Generator

(1/1)

Rayo:
I made this program to help me out while I was importing spritesheets from Spriters Resource to Game Maker.
Goal of this program is to split sprites into a spritesheet of equal horizontal length.

How it works:
First of all, this program looks for vertical lines where the sprite doesn't appear so each of your sprites need to be separated by at least one pixel.
After that it looks for the sprite with the longest horizontal length, splits the sprites, and outputs the result.

How to use:
The first picture shows those sprites which are loaded(They need to be in the same directory as the program and you need to name it "sprite.png").
Background color is not important, you can use whatever you want, even invisible. Just crop and trim the sprite before you start the program.
After that you start the program and voilĂ  you get the second picture as the output.
The program also creates a folder Sprites where single sprites are stored.

Probably you will need to adjust some single sprites later, but the program still does a lot of work for you.

Miles07:
If you have a Github link for the source code, maybe some of us can help refine it so that, for example, it can take any file input and output as a specified name.

Rayo:

--- Quote ---If you have a Github link for the source code, maybe some of us can help refine it so that, for example, it can take any file input and output as a specified name.
--- End quote ---
I just attached the Game Maker file into the start post. I used Game Maker 8.1.

What this program still needs is to move single sprites to their correct position (after the main progress). Depending on a point which is given by the user.
I was not sure how to implement that so I haven't done that yet.

Miles07:
Also, does the program break when there is more than one row of sprites? Or does it calculate the spacing for ALL rows the same? Or is each row calculated separately from the others?

Rayo:

--- Quote ---Also, does the program break when there is more than one row of sprites? Or does it calculate the spacing for ALL rows the same? Or is each row calculated separately from the others?
--- End quote ---
It is only supposed to work for one row.

Navigation

[0] Message Index


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Go to full version