- Home /
Fog Of War For Unopened Rooms
Hi, so I've reached a dead end on my strategy game. I want fog of war that is over unopened rooms but when you open the rooms the fog of war should disappear some strategy games have done this like Invisible Inc and Enter the gungeon just to name some examples. Any help is appreciated, thanks :)
This looks like a decent option if you are willing to buy an asset.
Answer by springwater · Jul 08, 2017 at 06:59 PM
Why not do overlapping square planes with alpha channels that fade out on the edges? They will obscure the rooms, and when get destroyed based on proximity.
Sorry, but i have no idea what alpha channels are or how to fade out edges
Place an object that covers the area. Give it a material with a shader that supports transparency (like the Fade Standard Shader). Set the main color's alpha value to maximum. When the room is revealed, set the alpha value to 0. Alternatively, just destroy the object.
I guess that works thanks, doesn't look that good though
If you have gimp or photoshop, create a black image..erase the edges on all four sides with a soft falloff brush. The default brush in gimp has a soft falloff and will fade the edges to pure alpha 0. Be sure to add an alpha channel first if there isn't one. In Gimp its under layers, transparency add alpha channel. You should save it as a PNG, since pngs can save alpha information. Then if you use my method, overlap the tiles so that the alpha edges do not show through. Then delete when proximity is detected via simple code.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
What exactly is going on when I implement Update(), and other messages in MonoBehaviour 2 Answers
Yet Another Bullet Decal Problem 0 Answers
Flip over an object (smooth transition) 3 Answers