Page 6 of 15

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

Posted: Thu Dec 11, 2014 7:33 pm
by giann
Knowing that almost everything is done via shaders, I'm quite convinced there is a bottleneck somewhere.

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

Posted: Thu Dec 11, 2014 7:55 pm
by Relazy
giann wrote:AMD radeon HD 6350. 800x600 is fine, > 1024 is far worse.
I get around 51 fps on 1024 x 720.

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

Posted: Thu Dec 11, 2014 8:25 pm
by drunken_thor
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

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

Posted: Thu Dec 11, 2014 9:33 pm
by Relazy
@drunken_thor, would it be possible to have lower resolutions for the shadow objects/lights themselves without changing the screen resolution?

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

Posted: Thu Dec 11, 2014 10:53 pm
by drunken_thor
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.

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

Posted: Sat Dec 13, 2014 11:13 pm
by soulaymenc
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.

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

Posted: Sun Dec 14, 2014 1:28 am
by drunken_thor
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?

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

Posted: Sun Dec 14, 2014 4:32 pm
by soulaymenc
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 :'(

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

Posted: Sun Dec 14, 2014 6:14 pm
by drunken_thor
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.

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

Posted: Wed Dec 17, 2014 7:43 pm
by joedono
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.