Hello. While working with Tiled editor and experimenting with filestream in C++ to load maps i noticed that Tiled editor can separate tiles into layers. An idea came to my mind, wouldn't be awesome to display tiles on screen based on layers they are living on. For example i can have a layer on screen with an array of tiles on it. If i destroy this layer all of the tiles inside of it would be destroyed. This could give you more control over objects in your map that are related to each other. Say for example you are fighting enemies and you kill their boss, all of he's army should be destroyed, which means that if you destroy parent layer you destroy all child objects living on it.
So i want to know if there is a possible way to display tiles in SFML based on layers. This can also be effective if you need to draw tiles over tiles, which will give depth and z index to objects on screen.
An example sketch of what i mean
I know that you can draw sprites on top of sprites by changing the order of the draw logic but what i want is how we can basically group tiles so that you can destroy them by destroying the layer they are living on and not iterate through each one of them.