My first Vassal Module!!

At least it is the first one that I am willing to put out for public consumption. But I do have one problem. It seems like the size of my module is rather large. At least in comparison to modules that are similar in scope. I have not created a zip file for it though. Will that really save a lot of space?

If not, what are the usual reasons for having a large module?

Don’t zip your module file.

There are a few reasons to not do so:

First, the savings in file size really is minimal.

Second, a Vassal module is itself a zip file, and sometimes, some unzip programs can get a little too zealous when unzipping, so they unzip the zip file, find a zip file inside it (the module), and unzip that, leaving all the module component files in a folder and confusing users.

A third reason not to zip the file is because I think zip files are no longer valid uploads on the web site. Leave your file as a .vmod file.

The vast bulk of a module’s file size is taken up by image files. Best way to have an impact on the size of your file is to reduce the file size of your graphics.

The new web site, btw, has a maximum file size of 50 MB. That’s pretty large for a module. If it’s still too large, you might be able to host it on a file-sharing site.

Thus spake mycenae:

The vast bulk of a module’s file size is taken up by image files. Best
way to have an impact on the size of your file is to reduce the file
size of your graphics.

Check whether there are graphics inside your module which aren’t being
used. If so, you can remove them.

I do not recommend reducing the size or quality of your module graphics
just to reduce the filesize, as that will also likely reduce the quality
of your module.

How large is your module?


J.

I think it was about 61,975 kilobytes, which doesn’t make any sense. It could be the way that I grabbed images. I used Adobe Acrobat to capture the images and then converted the images with MsPaint. The size is literally huge for what the file contains.

Thus spake radchad:

I think it was about 61,975 kilobytes, which doesn’t make any sense. It
could be the way that I grabbed images. I used Adobe Acrobat to capture
the images and then converted the images with MsPaint. The size is
literally huge for what the file contains.

What type of image are they (PNG, JPEG, BMP, etc.)?


J.

I think ms paint turned them into bitmaps.

Thus spake radchad:

I think ms paint turned them into bitmaps.

Every one of those formats is a bitmap. If you mean that Paint turned them
into BMPs, then that would be an excellent reason for them being huge, since
it’s probably saving uncompressed or RLE-compressed BMPs.

My recommendation is to convert your BMPs to PNGs. (Not to GIFs, and
definitely NOT to JPEGs.)


J.

Why not JPEGs?

I’m looking at a Lock 'n Load counter on my desktop.
PNG 31,403 bytes
GIF 12,338 bytes
JPEG 7,201 bytes

All three look about the same. Is there some speed issue with JPEG in VASSAL?

Thus spake zgrose:

Why not JPEGs?

I’m looking at a Lock 'n Load counter on my desktop.
PNG 31,403 bytes
GIF 12,338 bytes
JPEG 7,201 bytes

All three look about the same. Is there some speed issue with JPEG in
VASSAL?

JPEGs are for photographic data, and should really be used for nothing
else. The reason that it’s so much smaller is that it’s lossy—not all
of the data is being saved. Saving your image as a JPEG means reducing
the quality of the image.

It’s likely that that size of your PNG could be reduced significantly if
you repacked it with something like optipng.


J.

On Wed, Sep 08, 2010 at 07:01:16PM +0200, Joel Uckelman wrote:

Thus spake zgrose:

Why not JPEGs?

I’m looking at a Lock 'n Load counter on my desktop.
PNG 31,403 bytes
GIF 12,338 bytes
JPEG 7,201 bytes

All three look about the same. Is there some speed issue with JPEG in
VASSAL?

JPEGs are for photographic data, and should really be used for nothing
else. The reason that it’s so much smaller is that it’s lossy—not all
of the data is being saved. Saving your image as a JPEG means reducing
the quality of the image.

It’s likely that that size of your PNG could be reduced significantly if
you repacked it with something like optipng.

PNG will definitely get smaller once repacked. PNG only loses to GIF on
extremely small images and if given a strong headwind, like asking PNG
to store 24-bit data while GIF is storing 8-bit.

I haven’t looked at the Lock 'n Load counters that are used in the
module, but it may be that they
are originally photographs, which would explain some of the difficulty
GIF and PNG are having trouble compressing

If it isn’t clear, I agree with Joel on everything he said.

Jeff


“The man who does not read good books has no advantage over
the man who cannot read them.”
– Mark Twain

Granted its lossy. But if it comes out close enough are the extra bits worth keeping? :slight_smile:

For “noisy” art, JPEG works well enough. Doesn’t seem worth downloading and compiling a 3rd party tool just to end up back where I started. YMMV

Thus spake zgrose:

Granted its lossy. But if it comes out close enough are the extra bits
worth keeping? :slight_smile:

Saving anything which isn’t a scan as a JPEG makes the job of whoever wants
to clean up the art that much harder.

For “noisy” art, JPEG works well enough. Doesn’t seem worth downloading
and compiling a 3rd party tool just to end up back where I started. YMMV

There are numerous PNG optimizers (optipng, pngcrush, pngout, advpng,…)
and any respectable OS will have precompiled packages for at least one
of these available in it’s package manager.


J.

Mr Gates wont be happy to find out he’s not one of them then :slight_smile:


From: Joel Uckelman uckelman@nomic.net
To: messages@vassalengine.org
Sent: Wed, September 8, 2010 12:50:03 PM
Subject: Re: [messages] [Module Design] Re: My first Vassal Module!!

Thus spake zgrose:

Granted its lossy. But if it comes out close enough are the extra bits
worth keeping? :slight_smile:

Saving anything which isn’t a scan as a JPEG makes the job of whoever wants
to clean up the art that much harder.

For “noisy” art, JPEG works well enough. Doesn’t seem worth downloading
and compiling a 3rd party tool just to end up back where I started. YMMV

There are numerous PNG optimizers (optipng, pngcrush, pngout, advpng,…)
and any respectable OS will have precompiled packages for at least one
of these available in it’s package manager.


J.

I also have a very large module. I removed all of the counters and all of the auxiliary maps, and reduced the size of my game map to 25%. My game file size did not get even 1mb smaller, yet there is nothing left of my module.

OK. After running a few quick tests creating new modules. It seems that the module retains whatever graphic imagery that is put into it. I created a module with a 5.6mb map and the module was about 5.7mb. Then I did another with a 22.6mb map and the module was 23.2mb. Then I took the module with the small map, changed it to the 22.6mb map and saved. The file was 28.9mb. It seemed to retain the 5.6mb map graphic even though I changed it.

Lastly, I further changed the game map to a 12.1mb graphic and now my module is 41.4mb. It is storing every graphic I have ever used. That’s why MY module is so huge. It’s keeping graphics I no longer use.

So how do I convert my images to PNG?

Thus spake bugstomper:

I also have a very large module. I removed all of the counters and all
of the auxiliary maps, and reduced the size of my game map to 25%. My
game file size did not get even 1mb smaller, yet there is nothing left
of my module.

That’s because all of the module graphics are still inside the module.
You need to remove them manually, using a ZIP archiver.


J.

Thus spake radchad:

So how do I convert my images to PNG?

E.g., you could use The GIMP, ImageMagick, or optipng.


J.

I strongly recommend SVG graphics if you can do it. Inkscape is a very
nice, freely available tool. In addition, counter factors can be included
as text labels which not only cuts down on the file size, but also means
that you have the factors as a property in your module that you can use for
other purposes – and the factors can change (e.g., flipping, etc.).

It’s worth the effort in a lot of cases.

  • M.

On 9 September 2010 05:23, Joel Uckelman uckelman@nomic.net wrote:

Thus spake radchad:

So how do I convert my images to PNG?

E.g., you could use The GIMP, ImageMagick, or optipng.


J.

I strongly recommend SVG graphics if you can do it.� Inkscape is a very nice, freely available tool.� In addition, counter factors can be included as text labels which not only cuts down on the file size, but also means that you have the factors as a property in your module that you can use for other purposes – and the factors can change (e.g., flipping, etc.).


It’s worth the effort in a lot of cases.

- M.

On 9 September 2010 05:23, Joel Uckelman <uckelman@nomic.net> wrote:

Thus spake radchad:
> So how do I convert my images to PNG?
>

E.g., you could use The GIMP, ImageMagick, or optipng.

--
J.

Tried several zip archivers. Finally got one that would delete my unused graphics in the module. 7-Zip, it’s free.
Reduced my module size from 72mb to 28mb, just by eliminating the maps that I tried but ended up not using.

So far, the module appears to work fine in its smaller state.