Fog of War, Minimap, and First Enemy AI Prototype

Table of Contents

This devlog is a big milestone for my dice-based RTS project: adding Fog of War, a minimap, and the very first version of an Enemy AI. These features finally make the game feel like a “real” RTS in motion.

Fog of War

I’ve use an existing implementation of Fog of War system. Areas of the map that are not in the line of sight of your units are darkened. This implementation allows for obstacles to block the line of sight (not sure if this will stay in the final version). Also the Fog of War system provides information about which units should disappear when not in sight. I had to make some adjustments but all credits go to the original author - StupaSoft: https://objectorientedlife.github.io/game%20project/FOVMapping1/.

This adds tension and strategic depth: scouting matters, and you can’t see what the enemy is doing unless your units are nearby.

Minimap

To go along with Fog of War, I added a minimap to the UI. It displays terrain, explored areas, and unit icons. It’s a huge quality-of-life improvement for navigation and battlefield awareness. This is also an external asset. It required quite a lot of effore to integrate it with the Fog of War system but both assets turned out to be perfect, easily supporting the forecasted number of units (200+). Cretits goes to DIGITAL SOFTWARE/JOHAN ‘ZARKOW’ MUNKESTAM, https://assetstore.unity.com/packages/tools/gui/fast-rts-minimap-237367.

Fog of War + Minimap Integration

Both systems are now fully synchronised:

  • Units disappear from the main view and minimap when they move into unexplored or hidden areas
  • Unit icons on the minimap update dynamically as vision changes
  • Everything stays consistent between the main world and the minimap
  • Each unit type has it’s own dedicated minimap icon

Enemy AI Prototype

Finally, I built the first prototype of the Enemy AI. It’s basic for now, but it can already:

  • Gather resources
  • Produce workers and combat units
  • Attack the player’s base (currently hardcoded for testing)
  • Scout the map for resources if none are visible
  • Share information internally — when one worker discovers a resource, all others are notified

This gives me a working opponent for testing the core gameplay loop. It’s far from “smart” yet, but it already makes matches more engaging.

TL;DR

  • 🌫️ Added Fog of War
  • 🗺️ Added a minimap
  • 🔄 Integrated FoW + minimap for synced visibility
  • 🤖 Built a prototype Enemy AI that can gather, build, scout, and attack

With these systems in place, the game is now officially playable. Next steps will be to expand the AI’s behavior for more strategic depth and more focus on balancing the gameplay.


As always, thanks for following along! Got ideas for fun AI personalities or dice-based mechanics you’d like to see? Let me know on X!