Löve "Light vs. Shadow" Engine [0.4.3]

Showcase your libraries, tools and other projects that help your fellow love users.
NeonLight_Child
Prole
Posts: 4
Joined: Wed Oct 29, 2014 6:37 pm

Re: Löve "Light vs. Shadow" Engine [0.4.3]

Post by NeonLight_Child » Wed Oct 29, 2014 6:46 pm

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?

zell2002
Citizen
Posts: 60
Joined: Sun Feb 23, 2014 9:22 pm

Re: Löve "Light vs. Shadow" Engine [0.4.3]

Post by zell2002 » Sat Sep 26, 2015 4:58 pm

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.

User avatar
Guard13007
Party member
Posts: 126
Joined: Sat Oct 25, 2014 3:42 am
Location: Internet, USA
Contact:

Re: Löve "Light vs. Shadow" Engine [0.4.3]

Post by Guard13007 » Sat Sep 26, 2015 6:23 pm

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.

zell2002
Citizen
Posts: 60
Joined: Sun Feb 23, 2014 9:22 pm

Re: Löve "Light vs. Shadow" Engine [0.4.3]

Post by zell2002 » Sat Sep 26, 2015 11:11 pm

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!

User avatar
Guard13007
Party member
Posts: 126
Joined: Sat Oct 25, 2014 3:42 am
Location: Internet, USA
Contact:

Re: Löve "Light vs. Shadow" Engine [0.4.3]

Post by Guard13007 » Sun Sep 27, 2015 8:34 am

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).

zell2002
Citizen
Posts: 60
Joined: Sun Feb 23, 2014 9:22 pm

Re: Löve "Light vs. Shadow" Engine [0.4.3]

Post by zell2002 » Sun Sep 27, 2015 3:47 pm

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?

Starkkz
Prole
Posts: 24
Joined: Thu Jul 16, 2015 7:24 pm

Re: Löve "Light vs. Shadow" Engine [0.4.3]

Post by Starkkz » Mon Jan 04, 2016 1:27 am

Could you update this to work on love2d 0.10.0?

Starkkz
Prole
Posts: 24
Joined: Thu Jul 16, 2015 7:24 pm

Re: Löve "Light vs. Shadow" Engine [0.4.3]

Post by Starkkz » Mon Jan 04, 2016 7:20 pm

Here's my personal fix for love2d 0.10.0, if anyone is interested.
https://github.com/Starkkz/light-vs-shadow

User avatar
murks
Party member
Posts: 185
Joined: Tue Jun 03, 2014 4:18 pm

Re: Löve "Light vs. Shadow" Engine [0.4.3]

Post by murks » Sun Mar 19, 2017 11:06 am

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?

zell2002
Citizen
Posts: 60
Joined: Sun Feb 23, 2014 9:22 pm

Re: Löve "Light vs. Shadow" Engine [0.4.3]

Post by zell2002 » Sat Mar 25, 2017 8:50 pm

murks wrote:
Sun Mar 19, 2017 11:06 am
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?
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?

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests