Making an RTS game #14: Adding a minimap and fog of war 2/3 (Unity/C#)
In this new Unity RTS programming tutorial, we’ll continue working on our minimap and fog of war features!
⬅️ Tutorial #13: Adding a minimap and fog of war 1/3 | TOC |Tutorial #15: Adding a minimap and fog of war 3/3 ➡️
📕 Get the ebook and bonus material on Gumroad!
🚀 Find the code of this tutorial series on my Github!
Last time, we implemented a basic minimap and a fog of war system that allows us to change the lighting of the scene depending on the field of vision of the player’s current units. Today, we are going to improve both these features by adding:
- some game parameters to make the fog of war easier to configure
- a UI indicator that shows what part of the map the player is currently looking at through the main camera
Updating our game parameters
At the moment, we use our first building reference as our “headquarters” (it’s the “House” prefab)… but perhaps this could be added to our game parameters to change it more easily?
In a previous tutorial, we created a new Scriptable Object to hold the parameters for our current game…