Issues porting light_world.lua to 11.1 from 0.10.1
Posted: Sat May 19, 2018 12:35 pm
So I've been using a modified version of light vs shadow for my game, but it has some pretty bad vram issues, and it also doesn't allow you to set a light range from the function that spawns in a light so you have to do it with another function which isn't very clean. Despite all my improvements to the system such as moving the culling calculations over to the CPU and making it work better with scaling it's still too heavy, while playable on high end systems and most med end systems, anyone with a graphics card below something like a R9 270 or R7 260 would struggle to run my game at a reasonable frame rate.
On this map I made it uses 1.5 GIGABYTES of VRAM (at 720p, if I change the resolution to 1080p it goes up to 3.3 gigabytes o_o)
If I turn the lights off the VRAM goes down to <90 megabytes
So this is where the light_world library comes in, I got suggested to switch over to it on the löve discord. So I downloaded it and as I suspected it threw me a BUNCH of errors related to 11.x changes that has occurred since 0.10.1 (the löve version light_world was made for).
After about 1-2 hours of work I managed to get all the errors to stop. Then I put in some lights to test:
So all is good right? WRONG. NOTHING happened when I ran the code, just a black screen:
I have no idea what the issue is, I will continue and try to fix it on my own, but if anyone wants to try and figure out what's going on they can download my attempt at updating it to 11.1 here: Also here's a link to the light_world github:
https://github.com/tanema/light_world.lua
And it's wiki:
https://github.com/tanema/light_world.lua/wiki
EDIT: also I removed the post shader system, it had a ton of issues. If anyone wants to re-implement that they can, but it's not necessary for the system to work at all.
EDIT2: I also added this pull request to the system:
https://github.com/tanema/light_world.l ... a656012b46
On this map I made it uses 1.5 GIGABYTES of VRAM (at 720p, if I change the resolution to 1080p it goes up to 3.3 gigabytes o_o)
If I turn the lights off the VRAM goes down to <90 megabytes
So this is where the light_world library comes in, I got suggested to switch over to it on the löve discord. So I downloaded it and as I suspected it threw me a BUNCH of errors related to 11.x changes that has occurred since 0.10.1 (the löve version light_world was made for).
After about 1-2 hours of work I managed to get all the errors to stop. Then I put in some lights to test:
So all is good right? WRONG. NOTHING happened when I ran the code, just a black screen:
I have no idea what the issue is, I will continue and try to fix it on my own, but if anyone wants to try and figure out what's going on they can download my attempt at updating it to 11.1 here: Also here's a link to the light_world github:
https://github.com/tanema/light_world.lua
And it's wiki:
https://github.com/tanema/light_world.lua/wiki
EDIT: also I removed the post shader system, it had a ton of issues. If anyone wants to re-implement that they can, but it's not necessary for the system to work at all.
EDIT2: I also added this pull request to the system:
https://github.com/tanema/light_world.l ... a656012b46