Issues with map size - lag/heap problems

Along with another VASSAL user, I am planning a “World” game variant of Pirates of the Spanish Main. As the name implies, this variant will have a GIANT map of the entire world as the ocean.

I am simply wondering what the best solution might be for creating the map. I would estimate that our ocean needs to be at least 120000 pixels across and 60000 pixels high. I’ve tried editing a few pictures of the world into the module, but the file size is too large (I tried scaling one of them in GIMP to 140000x70000 and it crashed), while the picture itself is too small. That option is likely out.

I have thought about making my own artwork for the continents, because we are trying to have a disproportionately large ocean to accommodate the naval warfare. However, this may create issues with both the size of the images and the size of the edited module itself. We need a map that is gigantic enough for our project, but also detailed at a zoomed-in level (we’re planning on having faint location names on each island/territory).

The final option is to simply use the island pieces already in the module to create the landmasses, dragging each island into the ocean one by one. This would be extremely time-consuming and likely wouldn’t look as good as creating custom artwork for the continents. However, it may be the only option to minimize lag (though that many islands instead of one big picture would seem to create more lag) and to keep the module size reasonable. I’m not completely sure though.

Any ideas or suggestions?

I can tell you what I have learned from my own personal experiences so my equipment may have some bearing on whether this works for others or not.

I have also used some very large maps. I’ve personally found that large .JPG’s are much more likely to crash Vassal than large .PNG’s …even when a .PNG graphic was larger in size than the .JPG graphic. Go figure. Also, if there’s no transparency involved, convert your .PNG’s from 24 bit down to 8 bit. This usually reduces the file size significantly and the quality loss isn’t significant enough to really matter.

Also, I set my minimum heap at 1024 and my max at 1536. For me, that seems to work well for everything.

Other’s experiences my differ.

Thus spake DrNostromo:

I can tell you what I have learned from my own personal experiences so
my equipment may have some bearing on whether this works for others or
not.

I have also used some very large maps. I’ve personally found that large
.JPG’s are much more likely to crash Vassal than large .PNG’s …even
when .PNG graphic was larger in size than the .JPG graphic. Go figure.

JPEGs can in some cases require more memory when decoding.

Also, if there’s no transparency involved, convert your .PNG’s from 24
bit down to 8 bit. This usually reduces the file size significantly and
the quality loss isn’t significant enough to really matter.

I strongly recommend against this. While it will reduce file size and
image quality, I won’t make any difference for the amount of memory the
images use when loaded. All you’ll be doing is wasting your time to
make the images look worse.


J.

Thus spake a7xfanben:

Along with another VASSAL user, I am planning a “World” game variant of
Pirates of the Spanish Main. As the name implies, this variant will
have a GIANT map of the entire world as the ocean.

I am simply wondering what the best solution might be for creating the
map. I would estimate that our ocean needs to be at least 120000 pixels
across and 60000 pixels high. I’ve tried editing a few pictures of the
world into the module, but the file size is too large (I tried scaling
one of them in GIMP to 140000x70000 and it crashed), while the picture
itself is too small. That option is likely out.

That is a colossal image. There may be no image program in existance
which can handle an image that size and still perform reasonably.

If you want the overall map to be that size, split it into pieces
which are no larger than maybe 5k pixels in any dimension.


J.

Thank you both very much for your responses!

I tried adjusting the heap above 512/1024 (to 1024/1536), and it exceeded the maximum heap. I suppose it doesn’t help that I’m doing this project on a <$300 laptop. :slight_smile: (Though it’s my only option right now)

It really will be a gigantic map when we figure it out… I tried simply uploading a huge picture of the world (24000x12000) unedited to the module in both JPEG and PNG form, and neither worked. Today, I’ve managed to import that picture into Inkscape, where I saved it as an SVG, and I see that SVG’s are optimal for modules. I was also pleased to see that saving it in the new format dramatically decreased the file size! (from about 20,000KB JPEG/~300,000KB PNG to a 234KB SVG) HOWEVER, when I tried uploading this very manageable file size and then created the map with it, it doesn’t work. A blank cloud shows up (there is shading on all the maps, and turning it off just made it worse) - the “picture” (basically white space) looks to be about the right size, but there’s nothing there.

I thought about the possibility of the sheer pixel size being too large. However, I don’t think this is the problem, because I actually experimented by making a plain (non-picture) ocean that was various dimensions. I got it as large as 140000x75000, and there were no problems. (We’d likely experience lag with that ocean at some point, but we’re expecting to regardless.)

Am I doing something wrong with the SVG? Is there something I need to do in-between saving it as an SVG and uploading it to the module? I will admit that I’m a newbie in terms of editing modules; any help would be greatly appreciated!

Thus spake a7xfanben:

It really will be a gigantic map when we figure it out… I tried simply
uploading a huge picture of the world (24000x12000) unedited to the
module in both JPEG and PNG form, and neither worked. Today, I’ve
managed to import that picture into Inkscape, where I saved it as an
SVG, and I see that SVG’s are optimal for modules. I was also pleased
to see that saving it in the new format dramatically decreased the file
size! (from about 20,000KB JPEG/~300,000KB PNG to a 234KB SVG)
HOWEVER, when I tried uploading this very manageable file size and then
created the map with it, it doesn’t work. A blank cloud shows up (there
is shading on all the maps, and turning it off just made it worse) - the
“picture” (basically white space) looks to be about the right size, but
there’s nothing there.

File size is irrelevant to the amount of memory needed to display
the image in the file. A 24000x12000 image of any type—SVG, PNG,
JPEG—becomes over 1GB of pixel data.

You MUST slice this image into multiple smaller pieces if you want
this to work.


J.

Thanks again.

I have been trying various png images of continents in Inkscape, trying to scale them up to the map size we need. However, even images of individual continents (which are blank outlines, without any topographical features) have so far been too large (possibly far too large) for the module/VASSAL itself to handle.

As a result, I will likely make the map using the single island pieces. There’s no way to make an image that is approximately 60000x25000 pixels small enough to fit, at least not that I can find. Just exporting a big picture in Inkscape takes over 10 minutes.

Well, in theory using SVG instead of a bitmap will make the data file
smaller.
But at some point Vassal needs to create the actual image, and your image
size would require 6GB of memory.

I’m not sure how much the tiling of large maps would be likely to help, but
this is really gigantic.

Do you really need that much detail?

On Tue, Jul 5, 2016 at 8:10 AM, a7xfanben a7xfanben@gmail.com wrote:

Thanks again.

I have been trying various png images of continents in Inkscape, trying
to scale them up to the map size we need. However, even images of
individual continents (which are blank outlines, without any
topographical features) have so far been too large (possibly far too
large) for the module/VASSAL itself to handle.

As a result, I will likely make the map using the single island pieces.
There’s no way to make an image that is approximately 60000x25000 pixels
small enough to fit, at least not that I can find. Just exporting a big
picture in Inkscape takes over 10 minutes.


Read this topic online here:
Issues with map size - lag/heap problems - #7 by a7xfanben


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages

Indeed. It’s a map of the world, and we need a semi-realistic way to depict it. This project is a very large undertaking, and the game is not designed to end - it will theoretically increase in size as long as both of us are alive. I’m just going to create the map using the individual islands and hope that the lag is reasonable. I just tried uploading a very basic picture of a continent that was only ~800KB in size and VASSAL ran out of memory (I already tried increasing the heap with other pictures and it simply won’t be enough).

Thanks for the insight though everybody - it made it easier to narrow down the decision process. Once the game gets started I’ll probably post in the Games in Progress forum.

Thus spake a7xfanben:

Indeed. It’s a map of the world, and we need a semi-realistic way to
depict it. This project is a very large undertaking, and the game is
not designed to end - it will theoretically increase in size as long as
both of us are alive. I’m just going to create the map using the
individual islands and hope that the lag is reasonable. I just tried
uploading a very basic picture of a continent that was only ~800KB in
size and VASSAL ran out of memory (I already tried increasing the heap
with other pictures and it simply won’t be enough).

File size is irrelevant for memory usage. What matters is dimensions
in pixels.

What you need to do if you want this to work is make a grid of
smaller images and assign those images to Boards in VASSAL.

Try using a 10x10 grid of 6000x2500 images instead of one which is
60000x25000.


J.