I'm working on an ARPG, and I'd like to implement a "fading walls" system similar to Diablo II's.
Let's say I have this tilemap, where
- Black tiles are walls,
- Brown tiles are floors,
- White tiles are... nothing.
I could already achieve that every wall is faded which is on the bottom half of the screen. (The player is centered on the screen).
But I don't want to hide the walls further away from the camera than the player, even if it's on the bottom half of the screen. (Marked with red, above)
For this, I decided to calculate every walls' "inwards direction".
And the walls with inward direction pointing downwards on the screen are always shown, even if they are on the bottom half of the screen
Every wall already has their neighbours' type stored because I use them to determine their visuals.
Could you help me in figuring out a nice way to do this?
Or maybe the better question would be: how to nicely implement a Diablo II like wall fading system? :|