Hi :-)

Our FancyMines fmines package is 29 MB at the moment.

Interestingly, the game already uses a custom-made RLE compressed
data file format for images, which zips from 17 to 8 MB, while the
original BMP images in the source code only zip from 37 to 22 MB.
The game is written in freebasic. Nice that it uses RLE already :-)

Looking at http://mateusz.viste.fr/attic/fmines/ the source code
and binary downloads are 41 and 8 MB, respectively, which makes
it surprising that the FreeDOS package is 29 MB, containing an
embedded 21 MB (not 41 MB) sources zip.

Comparing the zips, one lacks animals/menu.bmp and the zip on
Mateusz' homepage contains a copy of the DAT files created from
the BMP files, duplicating those available in the binary zip.

Instead of carrying around both uncompressed BMP and custom DAT
files, it would be possible to use TGA or PCX RLE-compressed
image file formats. TGA is a really lightweight format :-)

https://en.wikipedia.org/wiki/Truevision_TGA#Technical_details

https://www.gamers.org/dEngine/quake3/TGA.txt

https://de.wikipedia.org/wiki/Picture_exchange

I can provide C snippets for generating palette based PCX and
TGA, but you probably want to use true-color PCX and TGA :-)

Another possibility is to include the true color images in
JPG, PNG or even WEBP format and use DOJS or similar tools
to convert them to uncompressed BMP on the fly to make DAT,
TGA or PCX files as part of the game compilation process.

That way, one would not have to include large BMP downloads.

Note that if you use default settings with ImageMagick, TGA and
PCX files would stay *uncompressed*, same size as the BMP now!

The default settings of ImageMagick convert the 30 MB of BMP to:

 - 12 MB of lossless PNG
 - 3.1 MB of default-compression lossy JPG
 - 988 kB of default-compression lossy WEBP

The defaults for lossy compression create nice high quality files.

So what do I suggest?

The sources could ship only JPG versions of the images and convert
those to compressed TGA files to ship with the binaries, compiling
via uncompressed BMP temp files and a bmp2tga (instead of bmp2dat)
tool, replacing loadmateuszgraphic by a little loadtga include :-)

Cheers, Eric



_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to