Making an RTS game #13: Adding a minimap and fog of war 1/3 (Unity/C#)

Today, let’s keep working on our RTS project — we’ll start implementing our minimap and fog of war features!

Mina Pêcheux
CodeX
Published in
12 min readJun 3, 2021

--

⬅️ Tutorial #12: Moving character units| TOC | Tutorial #14: Adding a minimap and fog of war 2/3 ➡️

📕 Get the ebook and bonus material on Gumroad!
🚀 Find the code of this tutorial series on my Github!

In a previous tutorial, we worked on our main camera and we implemented a translation-and-zoom system so we can move around our game view. In most RTS games, we also have a top view of the scene shown in a corner of the UI as a “minimap”. Another common feature in those games (present for example in Blizzard’s Starcraft or Warcraft series) is a mechanism called the “fog of war”: the idea is to limit the player’s vision of the terrain by only lighting up the areas within the range of vision of the player’s units.

Today, we’re going to start implementing these two features to our game — since it’s a bit complex and not as quick to setup as previous systems, I’ve separated this tutorial in three parts and we’ll continue working on it in the weeks to come ;)

--

--

Mina Pêcheux
CodeX
Writer for

I’m a freelance full-stack web & game developer. I’m passionate about topics like CGI, music, data science and more! Find me at: https://minapecheux.com :)