Page 11 of 12
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Posted: Wed Oct 29, 2014 6:46 pm
by NeonLight_Child
Hello. Great library:) I can not understand - how to remove the light source. If Icreate source this:
Code: Select all
self.light[i]=lightWorld.newLight(100, 100, --x,y
255, 230, 0, --RGB
30); --radius=Range
How remove this source?
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Posted: Sat Sep 26, 2015 4:58 pm
by zell2002
Firstly, what a great light lib! some incredible bits in here.
Quick question:
The light will hit a shape, and cast a shadow behind it, but if there is a shape behind that shape (and thus in the shadow) it gets drawn as if the light was hitting it - what is the best way around this..?
As in, I would like the shape behind the other shape to be in darkness.
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Posted: Sat Sep 26, 2015 6:23 pm
by Guard13007
zell2002 wrote:The light will hit a shape, and cast a shadow behind it, but if there is a shape behind that shape (and thus in the shadow) it gets drawn as if the light was hitting it - what is the best way around this..?
See the completely reworked fork of this engine called Light vs. Shadow v2 (or light_world, or LightWorld, I'm not 100% sure, I've seen it referred to in all those ways xD):
https://www.love2d.org/forums/viewtopic.php?f=5&t=78998
I'm not exactly sure how it compares in all aspects, but I do know it is more developed, and does the thing you are asking about.
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Posted: Sat Sep 26, 2015 11:11 pm
by zell2002
hey gaurd, cheers for the post - looks decent
ive switched it over just now, appears good too !
Although, it still does the lighting the wall from the other side - havent had a chance to look through yet
but, is it something i'm meant to activate/generate a specific light type?
Cheers again!
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Posted: Sun Sep 27, 2015 8:34 am
by Guard13007
zell2002 wrote:Although, it still does the lighting the wall from the other side - havent had a chance to look through yet
but, is it something i'm meant to activate/generate a specific light type?
I'm a bit confused what you mean. You have to create lights or else there are no shadows.
Also, I must have misunderstood your original problem, because I can assure you, the engine I linked to does not have that problem. Perhaps if you could show an example of the code you are using and what you are expecting, I can understand better and attempt to help out. Also, you should post that in the other thread, since that is what we are talking about at this point (and it is more current than this).
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Posted: Sun Sep 27, 2015 3:47 pm
by zell2002
OK, I will post over there.
The issue (if it is an issue) I see you can create using this or his project and spinning up the "complex" level. Left click and add a bunch of shapes then move the light around. The shapes light up even if one is behind the other, as if the light is above them shining down, rather than on the same level and shinning then hitting a wall... is this correct behavior for the lib though?
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Posted: Mon Jan 04, 2016 1:27 am
by Starkkz
Could you update this to work on love2d 0.10.0?
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Posted: Mon Jan 04, 2016 7:20 pm
by Starkkz
Here's my personal fix for love2d 0.10.0, if anyone is interested.
https://github.com/Starkkz/light-vs-shadow
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Posted: Sun Mar 19, 2017 11:06 am
by murks
Edit: it seems there is another version of this that works in 0.10
https://github.com/tanema/light_world.lua
which one to pick?
Re: Löve "Light vs. Shadow" Engine [0.4.3]
Posted: Sat Mar 25, 2017 8:50 pm
by zell2002
Just downloaded this, and came back to this thread to post questions (that I can see I've asked before)
The objects dont appear to actually stop light - I must be missing something?
If you have a light in the game, and a Wall, and a character on the other side of the wall.. the light shouldnt light up that character.
I must be something or does no one else agree with this?