possible image converter in the werks

Mapping & modding Fallout Tactics and reviewing maps thereof.
Post Reply
User avatar
Sirgalahadwizard
Vault Dweller
Vault Dweller
Posts: 151
Joined: Wed Apr 24, 2002 3:56 am
Location: 7th floor of the west-tek facility.

possible image converter in the werks

Post by Sirgalahadwizard »

Yeah, you heard me.

Got some inspiration from MacBeth's .spr replacement, and my own angst over getting images in the proper format for spray w/o using photoshop (which didn't pan out anyway).

My goal is to make an image converter that takes .gif, .bmp, or some other mundane 8-bit formats and composes them into those tough-to-make .raw files that Spray wants.


Things I know the program will do (or will try to do):
* Read palettes directly from the source image and save them as .act for Spray to use.
* Option to read palettes from a single, universal image (for those willing to use a global palette).
* Save both the palettes and output images with height and width information in the filename (and in the way that you can use the "import by name" function in Spray).



Only things that'll be goofy with the program are the following:
* Will be made in Java, so it wont be as convienient to run.
* Wont check to see if the size of the images is okay.
* Wont check to see which format the images are - name extentions accordingly.
* Use at own risk, it's a VERY simple program (ie, no exception throwing, no window interface... it simply asks for filenames as it goes along).
* Wont do any image modifications - like halving or color changing.
* You'll need an accompanying 8-bit image for the alpha values (will assume names).
* As is implied... will only do the dirty work before spray gets ahold of the images; wont actually make the .spr files for you.



For now, the only assistance I need:
* The formats of the imported images (gif, bmp...)
* The format of the ".act" photoshop palette
* The outputted structure of the .raw files.
* maybe some advice on read/write algorithms (if I get stuck).
(all substantial help with the above will be rewarded in the credits)


I decided that it'd be possible to make a program like this because Spray's maker listed the basics behind the .raw file needed (every other byte = the alpha value; interleaved; no header)


Basically, it's a toddler's project. I'm not trying very hard because I've got other things to concentrate on (just like the creator of spray, I only want something that just works).

I think i'd make alot of people happy to not need photoshop to make images for FOT... and if it doesnt, i've got another program for my CS portfolio.
User avatar
MacBeth
Vault Dweller
Vault Dweller
Posts: 117
Joined: Mon Jun 03, 2002 9:13 pm
Location: Poland
Contact:

Post by MacBeth »

interesting idea, unfortunately i wont be for you any assistance because my programming skill are limited to c++/tp7 (high school level language complexity)
- who's the one to BLAME!? -
- shin! shin! sei! kyuu! sai! -
- hail the mushroom cloud -

me not like my english ;)
User avatar
Jimmyjay86
Hero of the Glowing Lands
Hero of the Glowing Lands
Posts: 2102
Joined: Thu Apr 18, 2002 4:02 am
Location: Wisconsin
Contact:

Post by Jimmyjay86 »

To simplify things you may want to relegate it to a few image formats like gif, png, and maybe tga. These formats can store alpha channel information and are supported by every image program. I'm sure there are sites out there with plenty of info on these formats ehich could help you.

Good luck man!
User avatar
Sirgalahadwizard
Vault Dweller
Vault Dweller
Posts: 151
Joined: Wed Apr 24, 2002 3:56 am
Location: 7th floor of the west-tek facility.

Post by Sirgalahadwizard »

Eh.

Mostly my biggest problem has been with the image writing module. I make the program load the source image and it's alpha image, then theoretically the right thing to do is simply write the pixel info - with the odd numbered bytes being the alpha channel.

Unfortunatly, I must have got the formula wrong or something because the images are really distorted when I load them in spray (and yeah, I made sure the new size dimensions were input).

On the bright side though... it outputs .act palette files perfectly :p.

The principal base format is .bmp.

I ended up decoding the .bmp format myself, and found that it draws pixels from the upper right corner and somehow ends in the lower right corner. I tried .gif format first, but it stumped me.

I may just end up doing simple .raw files and making a utility to make em' all snazzy for spray (since 8-bit raw is practically nothing but image indexes - nothin but the sweet stuff).



I'm seriously thinking about porting it to a little-known game development software known as "Game Maker". It can make lotsa other stuff besides just games, it has a GUI-driven programming language that's remarkably simple. It also makes actual .exe files you can run from command-line.

I reckon that i'll have to re-write the program before it's all over anyway, it's a jumbled mess at the moment and i've got better ideas for streamlining it.
Flamescreen
Vault Hero
Vault Hero
Posts: 1017
Joined: Thu Apr 18, 2002 5:30 pm
Location: Stone of Light Land
Contact:

Post by Flamescreen »

This game-maker reminds me of something. what's the full name and the company making it? I have several such programs and want to see if this is one of them(In which case I could use it there).
User avatar
Sirgalahadwizard
Vault Dweller
Vault Dweller
Posts: 151
Joined: Wed Apr 24, 2002 3:56 am
Location: 7th floor of the west-tek facility.

Post by Sirgalahadwizard »

Well, scratch the game-maker idea.

It only writes "real" number values, I can't get it to write single bytes (as in, it probably writes numbers as those huge 8-byte ones - like Long and Double).

However, it'd probably work to make my own editor for my own game (ie, FTTools ish).

Oh... You can find game maker by simply searching for it on yahoo.
The address (already looked for it) is http://www.gamemaker.nl/

It was designed by Mark Overmars.

It's GUI driven and takes alotta the mystery out of organizing game development. Furthermore, it's got a powerful scripting language in it that isn't too different than C or Java.

The only unfortunate downside to that language is that it's designed specifically as a scripting language, so it's overly simplistic (ie, my problem of wanting to write byte values). I'm also not too sure if you can set up methods with their own arguments or design class-heirarchies; so it might not qualify as an object-oriented language.

It's still good programming experience for beginners though! (hint hint, calling all newbies)
Flamescreen
Vault Hero
Vault Hero
Posts: 1017
Joined: Thu Apr 18, 2002 5:30 pm
Location: Stone of Light Land
Contact:

Post by Flamescreen »

Sirgalahadwizard wrote:Well, scratch the game-maker idea.


Oh... You can find game maker by simply searching for it on yahoo.
The address (already looked for it) is http://www.gamemaker.nl/

It was designed by Mark Overmars.
Erm,...the footbal player??? :shock:
User avatar
Sirgalahadwizard
Vault Dweller
Vault Dweller
Posts: 151
Joined: Wed Apr 24, 2002 3:56 am
Location: 7th floor of the west-tek facility.

Post by Sirgalahadwizard »

No, but then again i'm not much into sports. It'd also seem that he was from the neitherlands too (the '.nl' at the end of the address).
Post Reply