Advertisement

Help! How to make "Fog of War"

Started by August 11, 2017 10:57 AM
1 comment, last by KarimIO 7 years, 5 months ago

 

Hi, how are you, people who love programming, here I am again after a very long time, I returned to Blender again with my project that I had left aside for personal study, work, etc. This time I want to resort to the help of Python programming experts and GLSL in Blender Game Engine.
The first question is?
How to make FOG OF WAR in GLSL and Python to a RTS GAME.
I am developing an RTS game in UPBGE or BGE. Only I want make a Fog of War System like the game Age of Empires. Do you remember? jajaja
Ok Brothers. Everything you konw please help me.

I'll be very greatful :) 

 

I will leave pictures of the game I am developing. Regards guys!!

https://ibb.co/dyQBPv
^-^
 

It largely depends on how your game works. Does it use a grid system like Age of Empires (it uses a very fine grid IIRC), maybe a hex system like Civilization, or is it all freely positioned? For the grid-based solution, I think you can cull all objects in hidden grid sections. Then simply draw a hex / grid shaped tile on it.

Otherwise, I think you'll need to render perhaps based on distance fields, or have a texture that is black originally, and you render circles near buildings and units to "remove the fog". Then overlay this on the terrain to hide it.

I'm not a strategy game developer but this is my best advice.

This topic is closed to new replies.

Advertisement