Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?

Started by handsource-dyko, March 06, 2013, 03:12:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

handsource-dyko

I have noticed that 8bit files created with bennu cannot be read by DIV. The same thing applies fpg's and exported maps created by SmartFpgEditor. Is this a bug or a simply a difference? Fpgedit (the new version) seems to create them correctly, because DIV can open them.

It applies to both DIV 1 and 2.

I know DIV uses a slightly different pixel format (6 bits per color component instead of 8 ).


DCelso

 :o , I'm the best. I'm retrocompatible yeah.  ;)
Quote from: handsource-dyko on March 06, 2013, 03:12:28 PM
..
I know DIV uses a slightly different pixel format (6 bits per color component instead of 8 ).
you are right. It is.
The problem of the others programs, may be that they are not clean (put to 0) all unused fields of fpg, like version or gamma, and they causes that DIV break.
But, there is a problem in recompability. Font generator tool that goes with fpg-editor (and font edit 32 bits) only generates fenix compatible .fnts.
I did it because in .fnts files there is two diferents 8bits font formats, DIV an Fenix, and I only done fenix version, beause is more similar to others colors depth.
Monstruos Diabólicos

"A PAck of classic GAMEs For BennuGD" en desarrollo
http://code.google.com/p/apagame4be/


darío

Hello,

Yes, there is a difference in the 576 bytes following the palette. In DIV this information is used by the map editor and it is called "gamma section". Fenix/Bennu do not use this information.

Still, in order for a MAP or FPG to be valid for DIV, the section cannot contain 0.

Smart Fpg Editor fills this section with 0. It was done on purpose (or better said, I simply did  consider it was worth the effort to make it compatible with DIV).

Besides, there is another difference: Fenix/Bennu support compressed fpg/map files in GZ format, DIV does not.

Smart Fpg Editor compresses FPGs and MAPs using this format. You can see it if you rename your fpg to "myfpg.fpg.gz" and open it with your favorite archiver.

Is there any particular reason you want to use FPGs with DIV? If so I may consider doing the required adjustments for the next release.

My sites:
Smart Fpg Editor - Painless FPG Edition for Bennu and PixTudio
fenixlib - .NET support for manipulating PixTudio, Bennu and Div graphic formats

handsource-dyko

I know that SmartFpgEditor uses compression. I still use DIV sometimes for graphics work (the gimp is ok for modern stuff) but for pixelart nothing compares to the interface of DIV. I am used to it, eventhough I also use Grafx2, wich is a Deluxepaint clone.  But Grafx2 not as user-friendly (very quirky amiga style interface)  as DIV, and it doesn't support fpg/map formats. The ability save a file so that DIV can open it, is more or less a conveince for me, just for retro compatibilty.

Grafx2 is a nice color palette based editor, but in terms of interface friendlyness between Grafx2/D-paint and DIV is about 10 years of evolution.

I don't know if it's woth the effort to include an option in SmartFpgEditor or to extend in bennu's map_save / fpg_save functions. It depends on the demand. But for me it would only be a nice thing to have.   ;) I am thinking about writing simple bitmap editor in bennu that supports map and fpg files with colorpalettes, since in the upcoming malvado 1.8 release I have created pixel editor for tile objects that editor uses. It is not a full graphics package, it can only draw pixels in a few select colors for the hardnessmap.


DCelso

Quote from: darío on March 06, 2013, 09:40:20 PM
...
...

Still, in order for a MAP or FPG to be valid for DIV, the section cannot contain 0.

...

Impossible, dario, I 'm doing it in fpg-editor. If this is true then fpgs made with fpg-editor did not work.

There is another field that you are filling and me don't.

handsource-dyko, can you tell us if the fpgs made wit fpg-edit2009 works in DIV?
Monstruos Diabólicos

"A PAck of classic GAMEs For BennuGD" en desarrollo
http://code.google.com/p/apagame4be/

handsource-dyko

#6
I have sucessfully opened an fpg that was created with the latest version of fpgedit.

Update: after unzipping the map and fpg files that where generated by smartfpgeditor, div sucessfully opended them. I noticed that bennu's
save_fpg / save_map function uses compression too, after decompression, DIV can open the fpg, but with weird glitches. (incorrect map names and some only the first graph is correct, the other ones are glitched).

I attached 3 fpg files:

- TESTFPGE.FPG : created by fpgedit (latest version)
- TESTSFPG.FPG : created by smart fpg editor (latest version) (unzipped)
- TESTBGD.FPG : created by my own bennu tool (unzipped)

DCelso

Quote from: handsource-dyko on March 07, 2013, 04:43:26 PM
..
DIV can open the fpg, but with weird glitches. (incorrect map names and some only the first graph is correct, the other ones are glitched).
...
Only your bennup app have this problem? Or all of them.
Monstruos Diabólicos

"A PAck of classic GAMEs For BennuGD" en desarrollo
http://code.google.com/p/apagame4be/

handsource-dyko

Only the fpg created with the fpg_save function in bennu. I don't know you still have a copy of div around, then you could see what happens.
Div also crashes when I try to view a graph. Div can't load a map created by bennu, even when it's decompressed and in 8 bit format.

darío

Then I was obviously wrong and the only relevant thing was the compression... :) But I read it somewhere...

It is not much work to include an option to disable compression. I will se what I can do ;).


My sites:
Smart Fpg Editor - Painless FPG Edition for Bennu and PixTudio
fenixlib - .NET support for manipulating PixTudio, Bennu and Div graphic formats

handsource-dyko

Allright!  :) Just out of curiousity, does the gamma section in div's map format have anything to do with it's grayscale mode? I wonder how div actually does that because it typically reduces the image to about 8 gray colors when you select the grayscale option in div. In my editart tool I created an algoritm that can convert a indexed color image to grayscale by scanning the rgb values of all the colors, and it marks colors with certain properties that visually look gray as "grayscale". I get a nicer result then div on the same image, because malvado's palette has about 30 grayish colors.

I have the details in this post: http://forum.bennugd.org/index.php?topic=3458.0
I used a spreadsheet to develop the alogrithm, but I think div may use a simpler methode.

DCelso

I would like to optain DIV2, to do test for fpgeditor, I lost my DIV CD copy several years ago :'(.

Monstruos Diabólicos

"A PAck of classic GAMEs For BennuGD" en desarrollo
http://code.google.com/p/apagame4be/

FreeYourMind


handsource-dyko

I've got both versions. DIV 1 english version on original CD, and DIV 2 spanish version from some obscure place on the internet. There is no  difference between DIV 1 and 2 in terms of fpg/map formats as far as I know. The version of DIV 1 I have has only 3 example games on it. That was a cd-mastering mistake made by the dutch distributor. 

I did a quick test, DIV 1 can open files made with DIV2.

FreeYourMind