gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > 16-colors? tools? transparent?

#10480 - goro - Sat Sep 06, 2003 10:41 am

This is a topic of much discussion here but having read many topics I still need some clarification so show me the light!!


I am using mode 0.

Q1. what is the definitive tool for converting 16 color sprites to
instantly usable gba header files? I need a WINDOWS tool that accepts gifs or pcx files.
I want .h files (not .raw files because it is much clearer for me to understand what is going on with the image with .h files).

Q2. Where in the palette should the transparent color go?
at the beginning or at the end. I know different tools put it in different places
but where (in the palette array) does the gba expect to find it?
(if the 1st slot, then do you mean the 1st slot of the whole 256 array or the first slot of every 16 color palette (ie slot 15, 31, 47, etc)?

Q3. Will the issues be the same for mode0 bg tiles?

Q4. How long is a piece of string?

#10486 - tepples - Sat Sep 06, 2003 1:59 pm

goro wrote:
Q1. what is the definitive tool for converting 16 color sprites to
instantly usable gba header files? I need a WINDOWS tool that accepts gifs or pcx files.

By a "WINDOWS" tool, do you mean a big-W Windows tool, that is, one compiled to run on Microsoft Windows (oppose a Linux or Mac tool), or do you mean a small-w windows tool, that is, one whose primary interface is graphical (oppose a command-line tool)?
Quote:
I want .h files (not .raw files because it is much clearer for me to understand what is going on with the image with .h files).

Do you want just raw data in the .h files, or do you want other information (width and height, etc) as well? If the former, you can use any of the bin2h tools to turn raw chr into a file you can include in your project. If the latter, it'd probably be better to design a GBA-side graphics format and write your own PC-side tool to convert to that format.

Quote:
Q2. Where in the palette should the transparent color go?
at the beginning or at the end.

The GBA hardware expects it at the beginning: index 0 for 256-color images, or indices 0, 16, 32, ..., 240 for 16-color images.

Quote:
Q3. Will the issues be the same for mode0 bg tiles?

Pretty much. The difference is that sprites use colors 256-511 while mode 0 background tiles use colors 0-255.

Quote:
Q4. How long is a piece of string?

Provided you're not using UTF-8 variable length encoding, a string is up to as long as you declared it, minus one character (the NUL terminator). char buf[32]; can hold up to 31 characters.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#10488 - Nessie - Sat Sep 06, 2003 2:12 pm

In my opinion, it is much easier to make sure that the artwork is drawn using the correct palette format. Certain art programs seem to be poor when it comes to working with palettes.

I've lately been using Graphics Gale a lot as it's pretty much perfectly geared towards doing pixel art. It supports the usual layers, transparency, animation tools, etc. I guess you can technically use it for free, though if you want full .gif support (animation and all) you'd have to shell out the $20 US dollars for it, which is pretty cheap! http://tempest-j.com/gale/e/

Specifically regarding your question, if you shift+click on a color in Graphics Gale, you can drag it to a new location in the palette without messing up your artwork. So it pretty much gets rid of the need for any specific tool and plus it has a lot of other uses.

As you can tell, I happen to like the software quite a lot, heh.

#10491 - goro - Sat Sep 06, 2003 2:52 pm

Tepples : Thanks for that, I meant a tool with a GUI as opposed to command-line.

Also - I want a tool that aids productivity by eliminating unnecessary conversions and stuff.

re: other information, I don't know what you mean. Surely people know the height and width of the sprites/tiles they want to use. Or do you need to supply it to the compiler from a header file?

Quote:
If the latter, it'd probably be better to design a GBA-side graphics format and write your own PC-side tool to convert to that format.


I don't understand. But anyways, right now I'm spending all my time trying to learn to program the GBA and I have no tools programming experience.

Nessie : re: Graphics Gale : That's exactly what the type of answer I wanted, ie a tried and tested tool that comes highly reccomended by someone that has had put it through it's paces...Thanks for that.

Thanks again for all of your help.

#10493 - tepples - Sat Sep 06, 2003 3:37 pm

goro wrote:
Tepples : Thanks for that, I meant a tool with a GUI as opposed to command-line.

Also - I want a tool that aids productivity by eliminating unnecessary conversions and stuff.

Usually, you can "aid productivity" by scripting your tools. If you need three conversions, write a script that does all three in a row. This is the point behind batch files and makefiles. In fact, this is part of why command-line tools continue to exist in Microsoft Windows, largely because they're easier to script. (No, VBS doesn't always cut it.)
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#10499 - goro - Sat Sep 06, 2003 5:19 pm

Oh, I understand now. I'll look into the type of automation that you're talking about but It's always nice to have a nice GUI too.

Thanks again for all of your help.

#11974 - delbogun - Sat Oct 25, 2003 2:56 pm

I'm looking for about the same thing. What is the best application for converting sprites like dovotos gba2sprite tool but instead for 256-color sprites I want 16-color sprites. It doesn't matter if it is DOS based or Windows based. Dovotos tool is great, but it is limited to 256-color conversion.

#11977 - goro - Sat Oct 25, 2003 3:31 pm

For sprites, I use gifs2sprites.

it can be found here :-

http://www.gbadev.org/tools.php?section=gfx

now normally I despise command-line tool but this tool :-

1. Accepts gifs.

2. allows the merging of several gifs into a .h file.

3 is comprehensive for this task without having too many complicated switches & options.

Hope this helps...

#14266 - headspin - Sat Jan 03, 2004 3:35 pm

I use gifs2sprites too

#14282 - hnager - Sat Jan 03, 2004 9:30 pm

Will those do 16 color sprites with the array in the .h in the proper format? A while back I was having trouble finding something that would give me the sprites as 16 color and in 8x8 blocks...so I wrote a really limited console ap which accepts a bmp, only...I'd rather use a more developed program so that I can use different filetypes.

Any of you looking for a tool, let me know if you find anything that does the trick.