-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|387|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Graphical Effects


 
Jayenkai
Created : 18 June 2007
 
System : Windows
Language : Blitz

Cheap lighting effect

But probably slow!

Using two seperate versions of the same set of graphics, one lit, and one unlit, you can then draw areas of Masked Color to allow the lit areas to shine through (or reversed, show the unlit areas for shadows.)


 

Comments


Monday, 18 June 2007, 08:59
shroom_monk
That's quite clever. Slight glitch though: as you are using MouseX()/MouseY() for every calculation involving the mouse, and these values change in the fraction of a second between calculations (if I'm moving my mouse very fast), not everything ends up where it should. This could be easily fixed by taking MouseX()/MouseY() at the beginning of each update stage, and putting them in variables that are used for the rest of that update.

Other than that, it's great! Oh, except it's a bit slow...
Monday, 18 June 2007, 10:11
magicman
Thats rather nice jay. not sure when i would ever need it, but its is still quite nice.