How to create a Metroid-style map?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Diet Estus

I am trying to implement a Metroid-style map in my hud. I want it to looks and behave similar to this one.

enter image description here

The way I currently have it implemented is like this.

I have a Map object which is essentially just aGridContainerof Cells. A cell is just a ColorRect with a couple of attributes (for example, was_encountered and currently_in).

In my level scene, I have another GridContainer which contains MapChunks. These are macroscopicArea2Ds which, when my player enters them, send signals to the corresponding cells in the Map node.

The result looks pretty good so far.

enter image description here

I would now like to add scrolling to this map, but don’t know how.

Do I need to create another Viewport? What about another Camera2D? Probably not the latter since you can only have one active camera in a scene at a time.

Any advice?