Is there any way to make Dynamic Lights in love2d? So like my character gives out light which is in the shape of a triangle and there are shadows for example:
The O is the character and the |+- are walls and the /+\ are lights and a . is thin air:
-------------------------------------------------------------------
..........................O.......................................
.........................//\......................................
........................//\\\.....................................
.......................///\\\\....................................
-----------------------------\\\...................................
..............................|\\.................................
................................\\\...............................
Get me? So the light stops at walls but if only part if it is blocked, the other part of the light will go further.
Is it possible? If it is, what is the code/math to it?
Thanks, rokit.
PS. That diagram took me ages to make
PPS. I should of made a MS PAINT Image...
PPPS. Nevermind
Light (dynamic?)
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Light (dynamic?)
I think you are asking for something like this: viewtopic.php?f=4&t=5340&p=42674#p42738 (check out the attached file)
Re: Light (dynamic?)
Not really, can you do an example of my EPIC diagram please?Ellohir wrote:I think you are asking for something like this: viewtopic.php?f=4&t=5340&p=42674#p42738 (check out the attached file)
u wot m8
Re: Light (dynamic?)
A Google search for 2D lighting should give you what you need.
Re: Light (dynamic?)
It didn't D:MarekkPie wrote:A Google search for 2D lighting should give you what you need.
u wot m8
Re: Light (dynamic?)
u wot m8
Re: Light (dynamic?)
Most scripting languages are easy to parse out. It's very unlikely that the stuff you find on the Internet is going to be written in the language you want it written in. Read the article, follow the instructions, and translate it to Lua. Hoping that you'll find something ready made to plug in isn't usually going to get you far.
- slime
- Solid Snayke
- Posts: 3133
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Light (dynamic?)
There's nothing about dynamic 2d lighting and shadowing that's specific to Lua, besides LÖVE's implementation of framebuffers (and shaders in 0.8.0).
Re: Light (dynamic?)
Maybe this example from VRLD could help
viewtopic.php?f=5&t=1871
viewtopic.php?f=5&t=1871
Who is online
Users browsing this forum: No registered users and 218 guests