How do I create lighting effect

0 favourites
  • 11 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • How would I create a lighting effect where it is as if the whole world is dark, but the area where the "Light" is?

    Kind of like a spooky game, only my player is inside a cave and its way too bright. I want it to be really dim in the cave, but have the torches I set out throughout the cave provide some light.

    I made a example in Paint of what I want an effect to be:

    This is what it currently looks like in the game:

    As you can see I have the torch and every thing but it doesn't really look as if its helping the lighting, and the cave isn't dark because I don't know how to do that without changing the color of the cave itself, and that isn't what I want, I want to still have it there, but kind of have darkness over it.

    If you could provide some detailed info on how, and maybe a .capx that would be great because I am not very good with construct 2 :c

  • I tried out your tutorial, and this is the effect I got:

    Which was not what I was looking for,

    I was looking more for something where it actualy seems like its casting light, where its making the area brighter, using that tutorial, it is very easy to tell that its just some image on top of blackness.

  • Adding a black image with just a transparent circle where you want the light to be and putting that image in the top layer should work.

  • Check the blending modes example that comes with C2, there's one you can use to make the screen darker, and have circles that "poke holes" in the darkness

  • I tried that but what if the player places down a light source? Say he picks up a torch and sets it down on the wall somewhere, what then?

  • What's the problem ? If you attach the light to the torch, the light will stay on the wall.

  • I am really confused, can anyone send me an example .capx?

    Because what your describing is that there should be one layer of blackness, and where the torch is should be transparent on that layer, why would the whole layer follow the torch? And then what if you place other torches....

    Sorry if i seem kinda stupid, new to construct and 2D Game dev really.

  • Can someone please provide an example .capx?

    Where the player can:


    -Place torches

    -Pickup torches

    -There is darkness and the torches will make light.

    Please, thanks

  • Open the "Example: Lightning"

    Just make a layer, set the background to black, not transparent and "set own texture" to yes. Put a white circle with the "Destination Out" effect and voilà! To add more torches just create more white circles

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • here is a very simple start point for you to look at.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)