5
\$\begingroup\$

I’m developing a 2d Metroidvania Game with a few huge (separated) Areas. In an in-game Menu the Player will be able to view a Map of the current Area. For this Map I want to implement a Map progression.

At first the complete Map is blacked out. When the walks around, the Map will become visible (coloured) at those Positions. Further more there will be several Shrines in an Area which make parts of the Map semi-visible (greyed).

Since the Map has three States: Unknown (blacked), Known (greyed) and Visited (coloured), I thought of a Graph (for each Area) which nodes represents small section of an Area. But the Areas are quite large and the section must be very small therefore the Graph seems impractical (too many Nodes).

Another Idea was to use an Alpha-Map with some kind of a Brush and everywhere where the player walks this brush paints the Alpha Map (at those positions) white. And for the Shrines pre-painting Paths manually (in grey) and set them on the Alpha Map if the Player activates a Shrine. But since the Areas can change (for better balance or to remove glitches/bugs) I would constantly have to repaint those Paths.

So has anyone some better ideas how to create a map progression?

\$\endgroup\$
2
\$\begingroup\$

You could draw just one colored map and use the least significant bits of each RGB component to convey a state (part of a shrine, visited). Your brush would flip these bits according to the player's movements and your needs.

\$\endgroup\$
  • \$\begingroup\$ Thanks for your Response, you led me to the very neat Idea. Considering the Image of the Map will not be transparent (or if than all Pixels will have the same Alpha Value), I can use the Alpha Bits of the RGBA-Value for coding the State. Further more, since the State is completly coded in the Alpha-Value I can draw the Alpha Value directly in GIMP. Which makes the repainting after a Level redesign very easy. \$\endgroup\$ – Jonathan Wright Jun 24 '18 at 21:17
  • \$\begingroup\$ I'm glad I could help :) Good luck with your project! \$\endgroup\$ – Stéphane Bura Jun 24 '18 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.