I’m working on a 2D tile-based map editor and I have a question about how best to manage the tile images. If, for example, I have a 1,000 x 1,000 tile map, what is the best way to display the image in the window so it can be updated quickly?
I have a TileMap class which stores the tile information, and my first thought was to combine the tiles into one image whenever the map is updated. But upon further thinking, I imagined that a map with a million tiles might take a long time to do that so I was curious if there was a better way to achieve this. Perhaps by only making the part of the map that is currently in the window? And if that is the case, how would this be done?
Another thought: Is there a way to have one image like I originally thought, but to just update that image whenever a cell is changed?
I’m just looking for options with how to procede, so any help is greatly appreciated