Minimap Woes

In my limited experience, Game Development is about negotiating obstacles one at a time.  Sometimes these obstacles take up 3-5 hours.  Other times, these obstacles took 8-10 hours, was solved, and somehow becomes unsolved after enough time has passed that your memory of exactly what you did has become null.  The minimap conundrum is one of those null memories.  It could be that I forgot to save the code, or that I introduced something new that caused issue with the previous code or prefab infrastructure.

Lets talk about minimaps.  If you’ve played Super Metroid from the mid nineties on the Super Nintendo, Castlevania: SoTN on the Playstation 1, or Axiom Verge, a very good recent Steam release, there is always a very convenient, constantly updating minimap to revert to.  If you want to know how important this map is in a Metroidvania kind of game, play some Metroid on the NES, Metroid II on the Game Boy, or even Blaster Master on the NES.  minimaps are essential in Metroidvanias.

Now we will talk about the make-up of a minimap.

Build-As-You-Go method:

This is an algorithm that dynamically builds the map as you go.  This algorithm places a color block for each newly explored area, and places a wall for every real, physical, non-passable wall.  A good example of this is in Castlevania SoTN.  I use SoTN as an example due to an exploit that allows you to leave the bounds of the map, and get a greater map % coverage.  I think this is something that I want to try out, but I’ll have to see which fits my needs better.

 

Static-Map-Method

This is an algorithm where the map already exists and is covered by fog.  Because it is difficult to find good source code for such a thing, it is hard to determine which games follow this path.  Essentially, the fog is the piece that becomes dynamic.  This is the algorithm that my minimap uses.  The only issue that I have so far is that more than 6,000 fog block prefabs have to be instantiated if I want to do the whole map.  This takes time, no matter the processor speed (on my Intel 4670k overclocked to 4.2 GHZ, this takes … too long for a fully developed game, and I won’t have any loading screens)

Other:

At the moment, I can’t think of any other viable algorithm that can happen in a near instant without a loading screen.  Soon, I will write in-depth about what goes into each algorithm, and the problems therein.

– Jacob

Leave a Reply

Your email address will not be published. Required fields are marked *