<< Back to Map Development Forum   Search

Posts 1 - 30 of 46   1  2  Next >>   
SVG file is too big - pls help: 10/11/2020 10:35:42

OligarchMagic
Level 35
Report
Hi guys, I just created a map but when I try to upload it on Warzone it tells me that the SVG file is too big and suggests me to do two things:
-Use the simplify tool on Inkscape (I tried but it doesn't work because it deforms all the borders of the territories making the map impossible to play)
-Delete images (I already deleted the PNG images I used for tracking and I only have some bitmap images on the map)
Even removing the bitmap images I was talking before, I would never reach the requested size of 2000 KB since my map is 33000 KB and it has about 1300 territories, I'm sure the problem is not the number of territories because there are maps, uploaded recently also, that have even 2000/3000 territories. I need a help to crop the size of the file without remove or deform excessively the shape of the territories, please I put so much time in this map ahah
SVG file is too big - pls help: 10/11/2020 10:38:16


Farah♦ 
Level 61
Report
What dimensions are your map? If it's like 10.000x10.000 pixels, that increases the filesize a lot. You can send me the SVG file if you want me to take a look.
SVG file is too big - pls help: 10/11/2020 10:41:00


JK_3 
Level 60
Report
You can also try running your SVG trough https://www.svgminify.com/ or something similar
SVG file is too big - pls help: 10/11/2020 10:51:50

OligarchMagic
Level 35
Report
Hey guys, I wasn't expecting such a fast reply, thanks a lot. Update: I tried remove the bitmap images and my map reached 3200 KB, I couldn't believe they occupied so much space. Anyway it is still too big. Yeah Farah, the document size is exactly 10000x10000 pixels, the map covers almost all of them but there is a little space on the edges left unused, you say it will decrease the size of the file only reducing the document size? I'll try and will let you know. If it isn't enough I'll use the program suggested by JK_3. Thanks
SVG file is too big - pls help: 10/11/2020 10:52:18


Farah♦ 
Level 61
Report
Try 2000x2000 pixels :)
SVG file is too big - pls help: 10/11/2020 11:09:03

OligarchMagic
Level 35
Report
Now you told me this I realized I did all the map using a "fit circle" (to be sure that all territories will then fit a two digit number) of 20 pixels radius, while it has to be 20 pixels high and large, so my map is twice the dimension that it should be. I'll try to reduce it and we'll see, finger crossed.
SVG file is too big - pls help: 10/11/2020 11:30:25

OligarchMagic
Level 35
Report
Reducing the map to 4500x4900 it reached 3140 KB, still far from the 2000 required. I tried using the link to minify the SVG file but as I expected, it removed all the "superfluous informations" as the territories and bonus links IDs that are important and the map won't be accepted without them. Other ideas? Farah I can send it to you if you want.
SVG file is too big - pls help: 10/11/2020 11:31:03


Farah♦ 
Level 61
Report
Yeah, I'll PM you my e-mail address and I'll have a look at it
SVG file is too big - pls help: 10/11/2020 11:31:55

OligarchMagic
Level 35
Report
Thank you
SVG file is too big - pls help: 10/11/2020 12:39:38


Farah♦ 
Level 61
Report
This is a rather tough one.
First of all, congrats on the map, it looks absolutely beautiful. I've tried most tricks in the books and checked a lot of things: you're not using Gaussian blur, object effects etcetera. You also don't have things hidden in other layers, so it must be the pure node count.

And nevermind me.
While writing this, I got another idea and found the problem. Your text objects are the problem. Deleting every text object takes away about 2 whole megabytes. I'm not sure of a proper solution, but you should be able to create the same style of text without it taking up every resource. I'll think about it. For now, the problem has been identified and maybe some other mapmakers know of a solution.

Edit: took me an hour. I charge 1 cookie per hour.

Edited 10/11/2020 12:43:48
SVG file is too big - pls help: 10/11/2020 16:25:43


Murk
Level 56
Report
How many nodes does the average territory has?

If it's only text and illustrations, shaving off another 1.5 MB would be difficult but not impossible. I'd be happy to take a look as well.

Also, keep in mind 4500x4900 pixels exceeds the map dimension limit anyway - I hope your territories are large enough to still fit armies after you shrink them?
SVG file is too big - pls help: 10/11/2020 18:34:28


Farah♦ 
Level 61
Report
His territories don't have a lot of nodes. There are two lakes on the map that have over 500 nodes, and every background object copies those nodes. Deleting all those nodes from the background shaves off another ~100kb, so it's a tad insignificant.
SVG file is too big - pls help: 10/12/2020 06:50:14


Murk
Level 56
Report
Oh, good. If the file size had been in territory nodes, you'd basically have to start over. Since that's not the case this should be doable.
SVG file is too big - pls help: 10/12/2020 11:23:03

OligarchMagic
Level 35
Report
Murk I didn't see in the map requirements a limit of map size in pixels, if my map is 4500x4900 it won't be accepted for sure? That would be a problem because, as I said before, some of my territories are large enough to fit just the minimum space necessary for a two digit number so I can't shrink the map more than this. Anyway I can send the map to you as well if you want to take a look at it. If the problem are the texts maybe it can be fixed using a "simpler" font? I don't think deleting all the texts is a good idea because they make connections more visible. What do you think Farah?
SVG file is too big - pls help: 10/12/2020 11:25:13


JK_3 
Level 60
Report
If you're making a super large map, note that the maximum map size is 3330x2400! (https://www.warzone.com/wiki/Creating_the_SVG#Getting_Started)
SVG file is too big - pls help: 10/12/2020 11:32:05


Spacemonk
Level 37
Report
can't wait to see the map published
SVG file is too big - pls help: 10/12/2020 11:35:27

OligarchMagic
Level 35
Report
Oh well, that's a really big problem, I'll have to change some territories that will become too small
SVG file is too big - pls help: 10/12/2020 11:37:43

OligarchMagic
Level 35
Report
It is the same if I do it vertically? I mean 2400x3330 instead of 3330x2400
SVG file is too big - pls help: 10/12/2020 11:39:52


JK_3 
Level 60
Report
I dont think it works if you turn your map like that, unless you rearrange the territories to fit within the 3330x2400 box.

I dont know how much territories and bonuses your map has, but the limit for both of these is 3200.
SVG file is too big - pls help: 10/12/2020 12:30:40

OligarchMagic
Level 35
Report
I shrinked the map to 3330x2400 and I'm trying to rearrange the territories differently since at first I setted it vertically. I did a quick check of the territories and the size shouldn't be a problem I hope, some territories don't fit perfectly the 20x20 circle but in a tutorial I saw once the guy said that 18x18 is good as well

Edited 10/12/2020 12:30:51
SVG file is too big - pls help: 10/12/2020 12:49:03

OligarchMagic
Level 35
Report
JK_3 I have about 1400 territories and 400 bonuses so it won't be this the problem
SVG file is too big - pls help: 10/12/2020 14:00:34


Murk
Level 56
Report
I've taken a look at the .svg file as well.
It's definitely doable. I'll walk you through some steps that help.

Most problematic are indeed the texts.
It's a nice font, so you don't want to touch the big titles, names and headers too much.
Instead, I gave each of the small texts (the street names and mountain names etc.) one ctrl-L.
Not all at once! Just selected each street name, pressed ctrl-L, selected the next, etc. Doing this one time for each street name separately keeps the font mostly similar (for the small text you'll barely notice), and the big text can stay as it is.
For me, this lowers file size from 3.16MB to 2.35MB.

Next, combine (ctrl-K) everything that has the same stroke and fill. Select all the small, black text (Edit > select same > fill and stroke helps) and combine it. Then do the same for all the small, white text. Then the big white text. Then select all the dashed lines (mountain routes?) and do the same. If you want to be thorough, you can even do the same for all the black arrows leading to the street names.
For me, this lowers file size from 2.35MB to 1.94MB.

Another thing you could do - but would be a bit more work - is redo the green background. Right now, every group of territories is "cut out" of the green background, so to say. This isn't necessary: territories will always show over background in Warzone anyway.
Instead, you could only draw the outlines of the green background and fill it green (and put it on the bottom of the layer for easier working). That would save a lot of nodes.
If you want to keep the black lines in between (not sure) you could just add those manually.
Not sure if I explained it well.
I tried it out, which brought file size down to about 1.88MB.

Then some smaller things:
Giving the lakes one ctrl-L each is another 0.01MB
Removing the "stroke paint" from each territory (Warzone will give them a stroke anyway) is another 0.02MB
Removing the "fill colour" from each bonus link (Warzone will give them a colour anyway) something similar.

All together, should be enough to get you well below 2MB without changing how the map looks in any significant way.

For future project, I'd advise to keep lines a little less wriggly (the dashed mountain paths, for example), to use octagons (or more) instead of circles and to pick a less fancy font. It would be a shame to have to redo it all at this point, so I hope the above is enough.


If all else fails, https://jakearchibald.github.io/svgomg/ is an amazing minifier.
Unlike the minifier JK_3 recommended, this one allows you to give really detailed settings about what you want to remove and what you want to keep.
It's been a while since I used it, so I don't know the exact settings you need any more. You'd have to play around with it a lot (and make back-ups!!!), but once you've got the right settings you can pretty much half the file size without changing anything about its appearance.
Always do this last, because it makes making changes very difficult.


Also also, please keep in mind most of these are tricks to lower the file size. They won't make the map run faster: in practice, I'd say the opposite.

Let me know if everything makes sense.

Edited 10/12/2020 15:57:26
SVG file is too big - pls help: 10/12/2020 14:57:34


Farah♦ 
Level 61
Report
Now THAT'S a proper explanation.
SVG file is too big - pls help: 10/12/2020 14:58:32


0x
Level 46
Report
yeah
SVG file is too big - pls help: 10/12/2020 14:58:51


Rick Sanchez
Level 58
Report
I don't even understand this but thanks murk
SVG file is too big - pls help: 10/12/2020 14:59:18


0x
Level 46
Report
longest, most complicated, explanitory, forum post i have seen
SVG file is too big - pls help: 10/12/2020 14:59:44


0x
Level 46
Report
and i understand none of it
SVG file is too big - pls help: 10/12/2020 15:00:08


Ocean0.1
Level 58
Report
Well, if I ever have an SVG that’s too big, I know how to solve it now
SVG file is too big - pls help: 10/12/2020 15:00:30


0x
Level 46
Report
that's probably cause i did not read and i am not specialized at computer stuff
SVG file is too big - pls help: 10/12/2020 15:02:40


Quantum Emergence
Level 43
Report
This should be in some sort of manual. Thanks for the info!
Posts 1 - 30 of 46   1  2  Next >>