I'm currently developing a 2D strategy game, and I've encountered some issues with the game map.
My idea is to use a single 2D image as the strategic map for the game. similar to this (Supremacy 1914) but in a 2D version:
However, I'd like players to be able to zoom in to see the details of the map or zoom out to view the entire map. Therefore, the image might have a high resolution (e.g., 10000x8000).
Now, my concern is that loading the entire image into memory would incur unacceptable memory overhead. One approach I'm considering is to divide this high-resolution image into blocks and only load the blocks within the player's view.
However, there's a drawback to this approach as well. If I need to zoom out to view the entire map, I'd still have to load all the blocks, resulting in excessive memory usage. Alternatively, I could prepare a low-resolution version of the image and load it when viewing the full map, but I'm not sure if this approach is elegant.
Do you have any suggestions? Your help would be greatly appreciated.