Bennu Game Development

English Forums => General => Topic started by: handsource-dyko on March 06, 2013, 03:12:28 PM

Title: Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: handsource-dyko on March 06, 2013, 03:12:28 PM
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 ).

Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: DCelso on March 06, 2013, 06:48:58 PM
 :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.
Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: FreeYourMind on March 06, 2013, 07:20:21 PM
who cares ? DIV is dead...
Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: darío on March 06, 2013, 09:40:20 PM
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.

Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: handsource-dyko on March 07, 2013, 02:57:20 PM
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.

Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: DCelso on March 07, 2013, 04:18:06 PM
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?
Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: handsource-dyko on March 07, 2013, 04:43:26 PM
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)
Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: DCelso on March 07, 2013, 04:56:54 PM
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.
Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: handsource-dyko on March 07, 2013, 06:37:42 PM
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.
Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: darío on March 07, 2013, 09:25:36 PM
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 ;).


Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: handsource-dyko on March 08, 2013, 08:44:38 AM
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 (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.
Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: DCelso on March 08, 2013, 02:55:59 PM
I would like to optain DIV2, to do test for fpgeditor, I lost my DIV CD copy several years ago :'(.

Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: FreeYourMind on March 08, 2013, 03:11:12 PM
for 500€ te original is yours  ;D
Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: handsource-dyko on March 08, 2013, 03:19:23 PM
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.
Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: FreeYourMind on March 08, 2013, 03:27:37 PM
I have DIV 1 and DIV 2 original spanish versions.

Title: Re:Difference in bennu's 8 bit fpg/map/pal formats compared to DIV?
Post by: handsource-dyko on March 15, 2013, 10:34:03 AM
New dev version of malvado 1.8 uploaded. Includes editart tool that I mentioned.  The mapeditor has gotten a mayor overhaul.
See documentation in "dev-docs/mainpage-editart.html" and the sources in "src/editor-editart/*.prg" for details about editart. It is split in two sections, "mainloop_create_art.prg" that does the grayscale conversion, and "mainloop_edit_art.prg" that is the basic drawing program.

Android version comes when bennu-android is ready.

http://code.google.com/p/malvado-bennuremake/downloads/detail?name=malvado2012-V.1.8-15-03-2013.zip&can=2&q= (http://code.google.com/p/malvado-bennuremake/downloads/detail?name=malvado2012-V.1.8-15-03-2013.zip&can=2&q=)

Some new levelmaps, but they are not in the game yet. (I'm running out of ideas for levels).