deutsch

Lights Off, Spot On!

vessel_lgt

I’ve just finished a plain lighting system for my sidescroller. It is possible to place custom sprites as lights into the scene. Those sprites are used to render a lightmap which represents the result of all lightsources in the current scene.

Now I can create  scary places for the player ;)

Posted on October 13, 2009 at 11.09 pm by Paul · Permalink
In: games, programming · Tagged with: , , , , ,

3 Responses

Subscribe to comments via RSS

  1. Written by Domi
    on 2009-10-29 at 8.00 pm
    Permalink

    sieht cool aus! :)

  2. Written by StevenB
    on 2010-04-30 at 11.59 pm
    Permalink

    Cool! I’ve been trying to do something like this myself, I don’t suppose you could share how you did the lighting?

  3. Written by Paul
    on 2010-05-03 at 4.23 pm
    Permalink

    Hi Steve.
    In fact, it wasn’t a big deal. I’m just drawing lightmaps (sprites in the color and shape of the light) on a black global lightmap (with the size of the screen) using the blend mode “BlendMode.SCREEN”.

    That way I get a global merged lightmap with all lights in it. Then I’m just rendering this global light over the whole scene using the blend mode “BlendMode.MULTIPLY”.
    That’s all :)

    If you’re using flixel too, you just have to override the render methods in your lighting classes.

    Maybe some day I’ll write a short tutorial about it.

Subscribe to comments via RSS

Leave a Reply