Blacked out areas of a map...

BlitzMax Forums/BlitzMax Beginners Area/Blacked out areas of a map...

po(Posted 2006) [#1]
I'm making a simple RTS and I was wondering... How would I go about creating the black 'fog' that limits a players view to only areas that have been visited (like starcraft)?


Dreamora(Posted 2006) [#2]
Do not draw that part or draw a different graphic above it using shade blend.
Thats actually up to you.

You could even use accumbuffer to black it out without drawing more 3d objects (Max2D is 2D in 3D, no real 2D)


JazzieB(Posted 2006) [#3]
If your map is stored in a 2 dimensional array, turn it into a 3 dimensional one where the second layer is just a flag that says whether that part of the map should be visible or not. As the player moves around change the flag on this level to True. When drawing check this flag and either don't draw the tile if it hasn't been visited yet or draw your "fog" or whatever instead.


po(Posted 2006) [#4]
Ah, thanks.