@JustSid:
That sounds interesting... I am listening. But what do you mean by sparse arrays? What type of meta-data besides the tile type and properties? Could you explain that aporach a little more? Mabe an example? (By example I dont mean code or anything, just a few sentences explaining how that would work)


EDIT:
I think I understood what sparse arrays are, but i didnt quite get how to best implement it. how does this sound to you:
Since not all zones will have predominant 0 value (water or whatever) I thought of first counting the amount of each value, and in the "zone data file" store the predominant (default) value for all tiles that will not be stored. Then the rest of the file would be a list of the rest of the values and the coordinates where they are, separated by some delimiter?

So my file format would be something like:
Dominant_Value|A,coords|B,coords|C,coords etc...

So for a zone like this:
25621
22762
82822
62221
21123

The file logic would be something like this:
2 dominant value
5 in coord 0,1
6 in coords 0,2 1,3 3,0
1 in coords 0,4 3,4 4,1 4,2
7 in coord 1,2
8 in coords 2,0 2,2

and the file itself would look something like this:
2|5,0,1|6,0,2,1,3,3,0|1,0,4,3,4,4,1,4,2|7,1,2|8,2,0,2,2

that would be 55 characters in the file vs the 49 characters needed to represent the same thing in normal format?
2,5,6,2,1,2,2,7,6,2,8,2,8,2,2,6,2,2,2,1,2,1,1,2,3

I think I dont quite understand sparse arrays well, or at least how to store them in a file eficciently?

Last edited by Carlos3DGS; 06/07/12 01:01.

"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1