<< Back to Map Development Forum   Search

Posts 1 - 9 of 9   
Shortened IDs for .svg: 2024-06-19 13:56:01


Coenquistatore 
Level 58
Report
It's been a while now that i started waging my personal battle against .svg's weight.

As a mapper, it's kinda hard to understand that all the artistic skulduggery i place on the map will be converted in simple lines of code: color, map coordinates, size and shape, all turn in a series of characters. Among all of these, object IDs play a fundamental role, as to let the WZ editor recognize the territories and the bonuses as such, we are required to keep each object separate and Name them Territory_1, Territory_2, or BonusLink_X and BonusLink_Y.

So i begun wondering what if the Editor recognized as Territories and Bonuses shorter IDs like T_1 or T_2 and BL_ in addition to their longer counterparts?

I made a a series of experiments and my upcoming map with 3500 territories and 600 bonuses would be reduced from 2.9 mb to 2.6mb. Cool right?

Edit: I verified my claim and it seems that some awkward combination made me save this much space, but this happened only on one map and shouldn't be considered a valid example. The average loss is much less, sadly...

Edited 6/19/2024 23:57:59
Shortened IDs for .svg: 2024-06-19 13:57:40


JK_3 
Level 63
Report
Awesome idea!
Shortened IDs for .svg: 2024-06-19 15:29:29


Mgreedy
Level 34
Report
An extra 300 MB when you’re using all the extra tricks to save on space would be actually so much more to play with. Great idea!
Shortened IDs for .svg: 2024-06-19 16:21:58


Bring * back! ⌛sucks! 
Level 62
Report
Would it save 0.3MB or 0.3MiB?
Shortened IDs for .svg: 2024-06-19 18:21:56

(deleted) 
Level 63
Report
That’s a really good idea.
Shortened IDs for .svg: 2024-06-19 20:08:25


JK_3 
Level 63
Report
So i did some math, and while this is a really cool idea, it wont actually matter much.

Because you lose 7 bytes for each bonus link, and 8 bytes for every territory, you win only a fraction of the total file size.
7*1500 + 8*4000 = 42500 bytes saved at best.

43kb out of a 3 MB file is 1.4% .... :(
Shortened IDs for .svg: 2024-06-19 20:48:35


Coenquistatore 
Level 58
Report
Yes, I totally agree, it should be worth the effort.

I didn't invent my claim of reducing the weight by this much, but we should check the math as much as possible. Even more to see if this is not a limited case or something that would be worthy only for the biggest maps.

The question though becomes: are there other things that could reduce the weight in similar ways? And if so, maybe changing them all could be worth the shot
Shortened IDs for .svg: 2024-06-20 01:54:56

(deleted) 
Level 63
Report
With 43KB saved you can add more map art.
Shortened IDs for .svg: 2024-06-20 19:02:11


allusernamesaretaken12 
Level 60
Report
Why BL_ instead of B_? Surely that would save even more space.
Posts 1 - 9 of 9