Löve "Light vs. Shadow" Engine v2

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
giann
Prole
Posts: 42
Joined: Fri Jun 28, 2013 11:38 am

Re: Löve "Light vs. Shadow" Engine v2

Post by giann » Thu Dec 11, 2014 7:33 pm

Knowing that almost everything is done via shaders, I'm quite convinced there is a bottleneck somewhere.

Relazy
Citizen
Posts: 51
Joined: Thu Jul 10, 2014 11:10 pm

Re: Löve "Light vs. Shadow" Engine v2

Post by Relazy » Thu Dec 11, 2014 7:55 pm

giann wrote:AMD radeon HD 6350. 800x600 is fine, > 1024 is far worse.
I get around 51 fps on 1024 x 720.

User avatar
drunken_thor
Citizen
Posts: 75
Joined: Wed Oct 01, 2014 12:14 am
Location: Toronto, Canada
Contact:

Re: Löve "Light vs. Shadow" Engine v2

Post by drunken_thor » Thu Dec 11, 2014 8:25 pm

I can see that with higher resolutions that there would be slow downs, I will see if I can find some ways to speed it up but it will take a bit off work. I am no expert at shading either so I also welcome pull requests :P
Light_world.lua for all your lighting needs
Github
twitter

Relazy
Citizen
Posts: 51
Joined: Thu Jul 10, 2014 11:10 pm

Re: Löve "Light vs. Shadow" Engine v2

Post by Relazy » Thu Dec 11, 2014 9:33 pm

@drunken_thor, would it be possible to have lower resolutions for the shadow objects/lights themselves without changing the screen resolution?

User avatar
drunken_thor
Citizen
Posts: 75
Joined: Wed Oct 01, 2014 12:14 am
Location: Toronto, Canada
Contact:

Re: Löve "Light vs. Shadow" Engine v2

Post by drunken_thor » Thu Dec 11, 2014 10:53 pm

Relazy wrote:@drunken_thor, would it be possible to have lower resolutions for the shadow objects/lights themselves without changing the screen resolution?
I am not sure, I think so but it would take some figuring. I think there are optimizations that I could do before that though.
Light_world.lua for all your lighting needs
Github
twitter

User avatar
soulaymenc
Prole
Posts: 34
Joined: Thu Jul 11, 2013 2:03 pm
Contact:

Re: Löve "Light vs. Shadow" Engine v2

Post by soulaymenc » Sat Dec 13, 2014 11:13 pm

Amazing library! I am integrating it into my game engine, and it seems to work well (except FPS issues on resolutions higher than 800x600 as mentioned earlier).

I have one question, why does

Code: Select all

lightWorld :newPolygon
supports 9 points at max? Can't I exceed that number? Just curious.
This world is so strange.

User avatar
drunken_thor
Citizen
Posts: 75
Joined: Wed Oct 01, 2014 12:14 am
Location: Toronto, Canada
Contact:

Re: Löve "Light vs. Shadow" Engine v2

Post by drunken_thor » Sun Dec 14, 2014 1:28 am

soulaymenc wrote:Amazing library! I am integrating it into my game engine, and it seems to work well (except FPS issues on resolutions higher than 800x600 as mentioned earlier).

I have one question, why does

Code: Select all

lightWorld :newPolygon
supports 9 points at max? Can't I exceed that number? Just curious.
I dont think there is a limit in any way, are you getting an error?
Light_world.lua for all your lighting needs
Github
twitter

User avatar
soulaymenc
Prole
Posts: 34
Joined: Thu Jul 11, 2013 2:03 pm
Contact:

Re: Löve "Light vs. Shadow" Engine v2

Post by soulaymenc » Sun Dec 14, 2014 4:32 pm

Thank you for your reply, no I have not tested it yet, but I was just curious so I can take it in consideration later on, as I saw on the github wiki page that the maximum number of polygons is 9.

Here is a quick screenshot of your lightning engine running under my engine:

Image

And yeah, still having fps issues :'(
This world is so strange.

User avatar
drunken_thor
Citizen
Posts: 75
Joined: Wed Oct 01, 2014 12:14 am
Location: Toronto, Canada
Contact:

Re: Löve "Light vs. Shadow" Engine v2

Post by drunken_thor » Sun Dec 14, 2014 6:14 pm

Yeah, I think I remember running into a polygon point limit somewhere but I cant find the documentation to back it up again. (I actually think the limit is 8 though)

As for FPS I am working on it but I am not sure how much more I can get out of it. I am going to have to get the old textbooks out again to see if I can cook up some wizardry.

The code is very readable though so again I am open to suggestions on how to speed it up. I will be merging some changes in the next few days that I have made that have made marginal gains but not enough to be happy with. you can check them out on the optimization_tests branch on the repo.
Light_world.lua for all your lighting needs
Github
twitter

User avatar
joedono
Prole
Posts: 40
Joined: Mon Mar 04, 2013 6:58 pm

Re: Löve "Light vs. Shadow" Engine v2

Post by joedono » Wed Dec 17, 2014 7:43 pm

I'm having a really weird issue. My top-down exploration game includes a character with a flashlight. When I start the flashlight with this code, it doesn't show up until I change the direction of the light. Then, if I try to swing the flashlight back to that direction, it vanishes again.

Code: Select all

self.flashLight:setDirection(math.pi * 3/4);
self.flashLight:setAngle(math.pi * 1/2);
However, changing the angle of the flashlight to math.pi * 3/8 seems to solve the problem, but I'd like a 45degree light if I can manage it.

I'll attach the project I have so far. Use WASD to move, the arrow keys to swing the flashlight around, and space to turn the flashlight on and off. If you try to shine the flashlight to the lower-left, it disappears when it gets there.
Attachments
flashlight-test.love
(54.82 KiB) Downloaded 107 times

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests