ZFGC

Projects => Other Projects => Topic started by: Rayo on February 24, 2017, 06:51:18 am

Title: Spritesheet Generator
Post by: Rayo on February 24, 2017, 06:51:18 am
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.
Title: Re: Spritesheet Generator
Post by: Miles07 on February 25, 2017, 01:18:46 am
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.
Title: Re: Spritesheet Generator
Post by: Rayo on February 25, 2017, 04:52:22 am
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.
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.
Title: Re: Spritesheet Generator
Post by: Miles07 on February 25, 2017, 09:01:00 pm
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?
Title: Re: Spritesheet Generator
Post by: Rayo on February 25, 2017, 09:29:34 pm
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?
It is only supposed to work for one row.

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