<< Back to Map Development Forum   Search

Posts 1 - 4 of 4   
Stupid SVG file size limit: 2018-01-23 22:35:35


҈ * TeeMee123҈ *
Level 55
Report
I have done some quick maths and worked out that maps can probably take up at least 30x less storage space on fizzer's servers (and that's just the really big ones). This means that fizzer can stop paying so much for servers and stuff and stop adding so much goddamn monitisation AND actually increase the map file size limit which I know zxctycxz has had a lot of trouble with when making his big maps. (ok maybe maps won't affect server costs that much but the file size limit definitely needs increasing)

The current limit is 2MB. I have worked out that all the useful data from the SVG file of a warlight map takes up about 60KB.
There is a lot of useless data in the SVGs, for example all territory points are stored with 3 decimal places when 0 is absolutely fine. You don't need to store the text "Territory_" for each territory ID. You don't need to store any colours for territories or bonus links.

I personally don't know what Fizzer has realised he doesn't need to store, but I know that it can't be much because you can download an uploaded SVG.
I'd like to know what is the reason for the map size limit. Whether it is to reduce the physical storage needed for the maps, or something about how they are loaded for each game.

My calculations:

STORAGE FOR TERRITORIES
10 points a territory * about 3000 territories = 30,000 points.
Values of X for each point range from 0 to 3,330, for Y it is 0 to 2,400.
3,330 + 2,400 = 5,730. log(5,730) (base 2) = 13 bits per point (maps above 3000 territories could be stored on a one-off basis or the limits could be changed to 3000 for all most people care).
13 bits * 30,000 points = 390,000 bits taken up by territory borders. That's under 50 kilobytes guys.
Each territory ID should be like 11 bits, so really it would be 140 bits per territory not 130, but I've exadurated storage costs in other places so ignore that.

BONUS LINKS
lets say they're 10 characters long, and that there are 3 territories per bonus so 1000 bonuses.
8 bits per character, 10 * 8 = 80 bits per bonus name.
80,000 bits total for bonuses.

That makes it no more than 500,000 bits taking bonuses and territories into account.
Which is about 60 kilobytes.

I started getting into this when I was writing an algorithm for a game with SVG importing and started understanding the code that makes up SVG files.

pls explain yourself fizzer

Edited 1/23/2018 22:54:53
Stupid SVG file size limit: 2018-01-24 00:05:52


l4v.r0v 
Level 59
Report
Fizzer is secretly working on this. If you're familiar with JavaScript/etc., you might want to help him out.

EDIT: without any familiarity with the SVG format on my end, some of your assumptions aren't very generous though

Edited 1/24/2018 00:07:18
Stupid SVG file size limit: 2018-01-24 03:07:00


Huitzilopochtli 
Level 57
Report
whats the point of bigger maps if we can only have 40 players
Stupid SVG file size limit: 2018-01-24 08:58:16


҈ * TeeMee123҈ *
Level 55
Report
It's more about more detailed maps, also it would eliminate the hassle of saving copies to plain svg, and simplifying territory paths.
I don't have any real experience with javascript, just java and c#
Posts 1 - 4 of 4