Directional Lighting with Shadows

0 favourites
  • 3 posts
From the Asset Store
Easy jumping mechanic with 8 direction behaviour. 9 EVENTS
  • Hi, I am currently creating a top-view horror game from scratch. I am inspired by the following games: Amnesia: The Dark Decent, Left 4k Dead, Lone Survivor. I have applied the same mechanics from the lighting tutorial supplied with the program.

    Examples:

    Flashlight: http://bit.ly/LOlERx(Left 4k Dead)

    Stationary Lights: http://bit.ly/LOlrOn

    How I create flashlight lighting is by using a white feathered(soft edged) triangle I made in Photoshop. I set the sprite in a new layer with a visible black background. Under effects of the triangle sprite, I put it as: Direction Out. I move the origin point so that it starts at the "origin" of the source of light(bottom of triangle). In the event sheet I tell the triangle to follow the mouse coordinates and connect it to the character. This all works and looks good, but...

    But there are some problems:

    1. When the mouse is on top of the character, the light is shown lighting the opposite way.

    2. There are no shadows created when shined over stationary objects such as walls; the light just shines through/over it.

    Is there an alternative way to create flashlight type lighting? How would I create shadows from the light? How can I create stationary lights (background planted lights)? Is is possible to create shadows given off the character from stationary lights?

    I will make a tutorial on creating directional lighting once I find a way to create this effect. <img src="smileys/smiley41.gif" border="0" align="middle">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Pretty interesting ... but if you are thinking about doing a tutorial i suppose there is no secret private code you want keep for your eyes only so please shared a little capx and sure some guys like me will spend time doing tests and try to find a answer ;-p

  • Thanks for the reply! I have been testing and trying to work on creating this effect to my ideas, but it's rather hard when I just found out about this program <img src="smileys/smiley36.gif" border="0" align="middle" /> . What I mean by that statement is that I will create a tutorial on how to create this effect once I learn how to do it <img src="smileys/smiley16.gif" border="0" align="middle" /> I will keep on trying to do this until then.

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