Hi
In a tilebased topdown 2D map-view (see pic below) the player in a RPG can explore by moving around the map (unexplored areas are black).
- I want the current location to be lit (a circular light, radius is the current vision range of the hero).
- I want all "explored" locations to stay slightly lit, so you can see terrain but nut as lit as where the hero currently is.
I dont want to draw a black image for each non-explored tile as this will be very jagged. My idea is to draw a soft-edged white circular sprite to a large black texture where the player is (when the player is moving). This large "light-texture" is then drawn (color multiplied) on top of the map (so unexplored areas are black and explored areas are "carved out" (white parts of this texture will be transparent thus letting the player see the map below). Is this a good idea?
The problem I see is if my gameworld is large, I need a very large texture to hold the explored/unexplored data of the entire map. I can use a smaller "light-texture" and then draw it upscaled 2-3 times I guess to lessen the problem somehow. But preferably i'd want to use max 2048x2048 textures to allow older graphics cards to run the game (or is that too conservative?)...