I'm working on a strategy game. One of the main mechanics is that the game map can be manipulated. Change terrain, elevation and so on. The map is randomly generated and consists of a block of a specified size. This is the problem. If I generate say a map of 230x130 block with size 5 pixels then it is still fine. Zoom, pan, edit is pretty fast, but if I want to make the world bigger, it's terrible.
I have the map as a 2D array where each index represents one block. Each block has its own position, size, neighbors, and lots of other statistics. What is the ideal way to save or work with the map?
The game is made in TypeScript.