Friday Rewind #9: Minimap

10.5.2019 - Jussi Kemppainen


We have been working on various bugfixes and things this week. One level was even almost completely remade from scratch as we were unhappy with it.
But during the last few days I have been focused on our long neglected minimap.

Map terrain

For the longest time our minimap only had mission objectives and enemies visible. It was missing the actual map.

We were tossing around ideas of how to create the map. Hand painted maps, procedural generation and vectors were on the table.
For some reason we had ruled out simply rendering a second camera. I tried that as a minimum viable solution for now this week, and it actually looked pretty decent!


So, now we had a terrain. Next, I added visualizations for game characters. Simple stuff. it soon became apparent that we need to show the character direction on the minimap as well.

I also tested how showing the game cursor on the minimap feels. It felt great! Adding the cursor to the map made it so much easier to reference minimap locations to actual game screen data.

After adding the cursor, we felt it would be a good idea to also add the walk target to the minimap. telling the distances to the player better. It too was a great idea.

For enemies, I also made their markers appear when you examine the enemy. In the past, the enemy markers only appeared when the enemy was less than 15m away from a player character.

Fog of War

For rendering the fog of war on the minimap, I created a simple solution of rendering a plane in the actual game level, only visible to the map camera. The fog of was texture is rendered to the plane’s alpha channel and as it is in the actual level the minimap camera sees the plane and renders it in the minimap. The plane is hidden from the game camera.


Field of View

While I was at it, I also added a projector for the game main camera, projecting borders around the in-game field of view. When you moved the in game camera, the borders would always render on top of the game geometry at the very edge of the screen. I also made these borders only visible to the minimap camera. Bam, we had accurate, always updating representation of the game field of view in the minimap now no matter how the camera is oriented!

I am pretty happy with how the minimap got a long overdue face-lift with only a few days of focus.

Leave a Reply

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