I am interested in implementing a map for my 2D action platformer. The map will be accessed when the player presses a certain button, and will show—at a very coarse grain—the sections of the world that the player has previously traversed. The sections are of various shapes and sizes, and I do not intend the map to show every platform and detail of each section, just a coarse grained shape of them and the various connections between them.
Ultimately, I want a map that looks similar to the one in Hollow Knight:
I am wondering what are some techniques for implementing this kind of map? It is hard to find info on how to implement this kind of map because of search result noise related to level design.
I image that I need to create an image of my final map, then define various areas on top of the image and link them to various area triggers in my level. When my player enters an area trigger in the world, I can send signal to the map to reveal and highlight the corresponding section of the map.
Is this a common technique?
How else could I implement this kind of map?
The engine I'm working in isn't important, so feel free to describe techniques in an engine-neutral way.