I have created a 2D Tile Based game. The game has a single path that the sprite can move on. I want to create to make the entire screen black except for where the sprite is.
The sprite has commands such as left where he keeps looking left, right where he keeps looking right and move forward where he moves in the direction he is looking. I want to make it such that when he looks left then the tile on the left of the sprites, fog should be removed and so on for all the sides.
How can I do this?