Here's the draw code for the example:
Code: Select all
local x, y = GetIsometricMouse()
love.graphics.setColor( 255, 255, 255, 255 )
love.graphics.draw( grad, x, y, 0, 1, 1, 128, 128 )
-- grad is an image of a round gradient, with white pixles in the middle.
love.graphics.setColor( 255, 255, 255, 255 )
love.graphics.draw( grad, 512, 256, 0, 1, 1, 128, 128 )
love.graphics.setBlendMode( "multiplicative" )
love.graphics.setColor( 255, 255, 255, 255 )
love.graphics.draw( rock, 0, 0, 0, 1, 1, 0, 0 )
-- rock is an image of some rocky texture. >>>( THE "MAP")<<<
love.graphics.setBlendMode( "alpha" )
So my question is: How can i make a layer over the map that turns dark where there's no "light".