Löve "Light vs. Shadow" Engine v2
Re: Löve "Light vs. Shadow" Engine v2
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
I get around 51 fps on 1024 x 720.giann wrote:AMD radeon HD 6350. 800x600 is fine, > 1024 is far worse.
- 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
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 

Re: Löve "Light vs. Shadow" Engine v2
@drunken_thor, would it be possible to have lower resolutions for the shadow objects/lights themselves without changing the screen resolution?
- 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
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.Relazy wrote:@drunken_thor, would it be possible to have lower resolutions for the shadow objects/lights themselves without changing the screen resolution?
- soulaymenc
- Prole
- Posts: 36
- Joined: Thu Jul 11, 2013 2:03 pm
- Contact:
Re: Löve "Light vs. Shadow" Engine v2
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 supports 9 points at max? Can't I exceed that number? Just curious.
I have one question, why does
Code: Select all
lightWorld :newPolygon
This world is so strange.
- 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
I dont think there is a limit in any way, are you getting an error?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 doessupports 9 points at max? Can't I exceed that number? Just curious.Code: Select all
lightWorld :newPolygon
- soulaymenc
- Prole
- Posts: 36
- Joined: Thu Jul 11, 2013 2:03 pm
- Contact:
Re: Löve "Light vs. Shadow" Engine v2
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:

And yeah, still having fps issues :'(
Here is a quick screenshot of your lightning engine running under my engine:

And yeah, still having fps issues :'(
This world is so strange.
- 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
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.
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
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.
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.
Code: Select all
self.flashLight:setDirection(math.pi * 3/4);
self.flashLight:setAngle(math.pi * 1/2);
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 235 times
Who is online
Users browsing this forum: Bing [Bot], Semrush [Bot] and 1 guest