I am making a top-down tile-based sandbox game, and it will have 400 layers of destroyable terrain, It will not use chunks, it will store the map in memory like Terraria, but only render the tiles on-screen, I don't want to take the approach that Dwarf Fortress does. Where it only renders one layer at a time. I want the player to be able to see a valley from the top of a mountain, not just the peak they are standing on.
I am not sure how i would store the 400 layers on disk, I think a file for each layer would be a nightmare for loading times.
Even if i only render the tiles on-screen, it would still probably cause lag, because it is still rendering 400 layers.