SMBX Tileset Compiler and Separator

Share and discuss custom SMBX graphics.
Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on-topic/appropriate?
-Are you posting in the right forum/following the forum rules?
-Do not create a topic requesting custom graphic. Do so in Graphic Request.
User avatar
RudeGuy
Luigi
Luigi
Posts: 4970
Joined: Fri Dec 27, 2013 7:36 am
Flair: help
Current Project: a random smw hack
Chat Username: rudeguy

Re: SMBX Tileset Compiler and Separator

Postby RudeGuy » Sat May 18, 2019 11:20 am

...Hey. Am I the only one to think this tool is a little bit rudimentary?
No?
Whatever, I had fun.
Around two weeks ago I asked FrozenQuills for the source code of this thing and decided to edit it, just to add some more functionality and make my life easier. What turned out is this new version:
Download the SMBX Image Compiler Version 1.2!
Source code download

Now, this version doesn't really add too much functionality if you just run the exe, outside of asking whether you want to compile or separe images, asking the extension to use and making fewer files when running it, but if you are a bit more experienced with the command line, you may like the fact that I've added some arguments to use. The arguments are these:
Spoiler: show
-c, --compile: Compiles the images in the folder specified by --edit-folder. When --edit-folder is not specified, it will use a folder called "edit", located in the program's directory.
-s, --separe: Separates the images in the folder specified by --joined-folder. When --joined-folder is not specified, it will use the image found in the program's directory (if it finds it).
-e, --extension [Either 'png' or 'gif']: The extension to use.
-ef, --edit-folder [Path to the folder]: Choose the folder of the images to join. Default is ./edit. This option is ignored if separing images. This option accepts more than one folder.
-jf , --joined-folder [Path to the folder]: Choose the folder where to save the big image cointaining the joined images. Default folder is the program's directory.
-of, --output-folder [Path to the folder]: Choose the folder where the separated images appear. Default is ./output. This option is ignored if compiling images.
-n, --name: The name to give to the big, compiled image. Default is "joinedImages".

Combining these arguments, one can do

Code: Select all

> smbx-image-compiler.exe -c -e png -ef /path/to/gfx /path/to/other/gfx -jf /some/random/folder -n tilesetgfx1
to get any graphics from both /path/to/gfx and /path/to/other/gfx and directly put the big compiled image into /some/random/folder with the name tilesetgfx1.png. Then you can separe like this:

Code: Select all

> smbx-image-compiler.exe -s -e png -of /level/folder -jf /some/random/folder -n tilesetgfx1
To get the compiled image from /some/random/folder and separe it directly into your level folder. If you can learn it, this can save you some time from having to copy the images you want, browsing to where you placed the program and later having to copy them again, as well having to always rename the images if you have multiple tilesets to recolor.
If you don't want to do everything this way, though, it's all fine. As I said, the old way of using this tool hasn't changed too much. (also, it's worth noting that this version might have fixed some bugs still present in older versions. Only when I got the source code could I run the 1.1 version correctly)

All that said, if any of you has any feature to suggest, I'll be more than happy to add it!
im bored

User avatar
Core
Grinder
Grinder
Posts: 1021
Joined: Tue Apr 15, 2014 8:29 am

Re: SMBX Tileset Compiler and Separator

Postby Core » Sat May 18, 2019 1:50 pm

Well that's some neat stuff, but i don't use it because i just realized this tool exsits lol. I will try it out some time heh.

User avatar
Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 7567
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: SMBX Tileset Compiler and Separator

Postby Enjl » Sat May 18, 2019 2:58 pm

Can you make the program autogenerate a palette in the corner of the combined image? I might start using it again if it gave me an option to view all colours easily.
ImageImageImageImage
ImageImageImageImageImageImage

User avatar
RudeGuy
Luigi
Luigi
Posts: 4970
Joined: Fri Dec 27, 2013 7:36 am
Flair: help
Current Project: a random smw hack
Chat Username: rudeguy

Re: SMBX Tileset Compiler and Separator

Postby RudeGuy » Mon May 20, 2019 2:59 pm

Enjl wrote:
Sat May 18, 2019 2:58 pm
Can you make the program autogenerate a palette in the corner of the combined image? I might start using it again if it gave me an option to view all colours easily.
First off, great suggestion. Exe + source
It doesn't have support for gif files and honestly I've kinda rushed into making it, but it should work well for png.
im bored

User avatar
Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 7567
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: SMBX Tileset Compiler and Separator

Postby Enjl » Mon May 20, 2019 3:43 pm

Sweeeeeet! Thanks.
ImageImageImageImage
ImageImageImageImageImageImage

User avatar
Lapuente
Cheep-Cheep
Cheep-Cheep
Posts: 19
Joined: Mon Dec 28, 2015 12:18 pm

Re: SMBX Tileset Compiler and Separator

Postby Lapuente » Sat Jul 06, 2019 8:02 am

do graphics work the same in SMBX 1.4/5 and in SMBX 2??
Image

User avatar
RudeGuy
Luigi
Luigi
Posts: 4970
Joined: Fri Dec 27, 2013 7:36 am
Flair: help
Current Project: a random smw hack
Chat Username: rudeguy

Re: SMBX Tileset Compiler and Separator

Postby RudeGuy » Sat Jul 06, 2019 8:19 am

Lapuente wrote:
Sat Jul 06, 2019 8:02 am
do graphics work the same in SMBX 1.4/5 and in SMBX 2??
i never looked into smbx 38A (what you refer as 1.4/5) but i'm pretty sure it also uses pngs.
either way, it doesn't matter. this program can do both gifs and pngs.
im bored

User avatar
PROX
Boom Boom
Boom Boom
Posts: 1743
Joined: Sun Jul 06, 2014 8:50 pm
Chat Username: PROX

Re: SMBX Tileset Compiler and Separator

Postby PROX » Tue Sep 17, 2019 3:15 pm

Now if only we had a tool that made importing graphics faster. Maybe then I wouldn't be so afraid to make huge spritesheets
I believe and I accept Jesus Christ as my Lord and Savior. If you do, put this in your signature.

If it makes sense then it must make dollars

Youtube Channel: ProxyHax O.O

My Project (No logo yet): viewtopic.php?f=90&t=18321&start=20

My Graphics Pack:
Image

World Map Pack: viewtopic.php?f=31&t=20173

User avatar
RudeGuy
Luigi
Luigi
Posts: 4970
Joined: Fri Dec 27, 2013 7:36 am
Flair: help
Current Project: a random smw hack
Chat Username: rudeguy

Re: SMBX Tileset Compiler and Separator

Postby RudeGuy » Fri Oct 04, 2019 10:51 am

PROX wrote:
Tue Sep 17, 2019 3:15 pm
Now if only we had a tool that made importing graphics faster. Maybe then I wouldn't be so afraid to make huge spritesheets
Hey sorry for replying after so long.
I've thought about this for some time and got to the conclusion that a perfect importing tool would impossible , or at least difficult to do in my skill level (mostly due to how different spritesheets can be with each other. one can have 32x32 blocks only, one 64x64, another can have various blocks of different sizes... you'd have to figure out where the various images are, which can be difficult)... well, unless we put in a few restrictions. I came to two solutions:
  • If you've ever used this tool, then you've probably noticed that it creates a .txt file along with the image. What this .txt file contains is the names of the images and their sizes, which it uses to separe later. We could use this file for something more: specify where the images are located in the spritesheet, what their size is and so on. This would however require people to do more work than what they should. Which brings me to the next solution:
  • Restrict how the spritesheet should be laid out, so that we can quickly import tiles without too much difficulty. You'd be required to create a spritesheet of 32x32 squares only (or something along those lines), but then you'd just need to run this tool once and all your graphics will be ready.
I'm thinking of implementing the second solution, along with fixing a few other things. Let me know if you (or someone else) can think of a better way.
im bored

User avatar
PROX
Boom Boom
Boom Boom
Posts: 1743
Joined: Sun Jul 06, 2014 8:50 pm
Chat Username: PROX

Re: SMBX Tileset Compiler and Separator

Postby PROX » Sat Oct 05, 2019 10:36 pm

RudeGuy wrote:
Fri Oct 04, 2019 10:51 am
PROX wrote:
Tue Sep 17, 2019 3:15 pm
Now if only we had a tool that made importing graphics faster. Maybe then I wouldn't be so afraid to make huge spritesheets
Hey sorry for replying after so long.
I've thought about this for some time and got to the conclusion that a perfect importing tool would impossible , or at least difficult to do in my skill level (mostly due to how different spritesheets can be with each other. one can have 32x32 blocks only, one 64x64, another can have various blocks of different sizes... you'd have to figure out where the various images are, which can be difficult)... well, unless we put in a few restrictions. I came to two solutions:
  • If you've ever used this tool, then you've probably noticed that it creates a .txt file along with the image. What this .txt file contains is the names of the images and their sizes, which it uses to separe later. We could use this file for something more: specify where the images are located in the spritesheet, what their size is and so on. This would however require people to do more work than what they should. Which brings me to the next solution:
  • Restrict how the spritesheet should be laid out, so that we can quickly import tiles without too much difficulty. You'd be required to create a spritesheet of 32x32 squares only (or something along those lines), but then you'd just need to run this tool once and all your graphics will be ready.
I'm thinking of implementing the second solution, along with fixing a few other things. Let me know if you (or someone else) can think of a better way.
I can totally get behind the second idea.
I believe and I accept Jesus Christ as my Lord and Savior. If you do, put this in your signature.

If it makes sense then it must make dollars

Youtube Channel: ProxyHax O.O

My Project (No logo yet): viewtopic.php?f=90&t=18321&start=20

My Graphics Pack:
Image

World Map Pack: viewtopic.php?f=31&t=20173


Return to “Graphics”

Who is online

Users browsing this forum: No registered users and 4 guests