I've been trying to create a grid-based open world game. In order to do that I've decided to create a personal map editor. The problem I've encountered is handling data because of the actual data size. For example if I were to have a 2.000x2.000 world, I'd have a total of 4.000.000 grid cells (tiles).
Now then, if we assume that each cell can hold the following:
- ground image,
- an add-on on top of that image (something like a flower, or any type of decoration),
- a wall or anything like that, a box, a tree, etc
- an add-on on top of a wall (a torch, spiderweb, etc)
And if we assume that each of those takes up to 8 bits (basically that id takes a stored ID from 0 - 255) it would take a total of 2.000*2.000*32 bits of data, which is equivalent to 125 megabytes to store a map of that size. Now then, the size itself isn't a problem if I were to have only 1 floor (you can look at floors as z-axis). But what if I wanted to have several floors? The size would be equivalent to 125*floor megabytes which gets ridiculous over time.
My question would be, what do you think would be the best way to store this type of data, or tiledata in general when working with maps which have enormous size?