I’m currently working on an isometric view game where the world is made up of 3D Blocks. I want a 128x128 block map with a max height of 8 blocks. Storing each vertical column of blocks as a bit per block would mean 1 byte per vertical column and 16384 bytes in total to store the map.
Clearly, this is way too much. However, the majority of the map is empty space so could be compressed.
I am trying to think up ways of compressing the map. One way would be to simply use RLE on the entire map. The problem with that is trying to draw the small section of the map visible on the screen at any one time (probably approx 10x10x10 or thereabouts) and having to process the entire compressed array just to find out what blocks are within that smaller area.
So, I thought of breaking the map down into smaller areas, say 64x64x8 or and compressing those as separate sections of the map. This would mean processing a visible area would be a lot less processor intensive. The disadvantage is less compression as it also splits areas with zero blocks up.
So, what are your thoughts on this guys? Any suggestions?