I've been working on my game for years and hit a wall I can't seem to overcome. It's an issue with Khas - Advanced Lighting plugin.

Plugins in question:

Galv - Galv's Layer Graphics

Khas - Advanced Lighting:

I have a few plugins installed, but have narrowed it down to these 2.

Here's the issue:

Player is on a map using Khas - Advanced lighting plugin features. Player leaves that map and goes to a map that does not use any lighting features (so there is an OFF switch embedded in the exit).

On the new map, there are layers (Galv's Layer Graphics). Press Esc to open the menu. Everything is fine so far. But then closing the menu results in a black screen. Cannot be recovered and need to shut down at that point.

I learned it is these 2 plugins through a process of trial and error. I also learned that if the OFF switch embedded in the exist on the map where Khas - Advanced Lighting stuff is used is removed, then the issue does not occur. This would be fine, except that if I do not add the OFF switch, the screen jerks occasionally.

I hope someone with more knowledge of javascript than I can help me figure out what to do, as I really want to continue to use all of these plugins.

Thank you.
Plugins in question:

Galv - Galv's Layer Graphics

Khas - Advanced Lighting:

I have a few plugins installed, but have narrowed it down to these 2.

Here's the issue:

Player is on a map using Khas - Advanced lighting plugin features. Player leaves that map and goes to a map that does not use any lighting features (so there is an OFF switch embedded in the exit).

On the new map, there are layers (Galv's Layer Graphics). Press Esc to open the menu. Everything is fine so far. But then closing the menu results in a black screen. Cannot be recovered and need to shut down at that point.

I learned it is these 2 plugins through a process of trial and error. I also learned that if the OFF switch embedded in the exist on the map where Khas - Advanced Lighting stuff is used is removed, then the issue does not occur. This would be fine, except that if I do not add the OFF switch, the screen jerks occasionally.

I hope someone with more knowledge of javascript than I can help me figure out what to do, as I really want to continue to use all of these plugins.

Thank you.
I can't respond to your question but there are many cool alternatives for GALV Layer Graphics!
For example my personal favourite - upp_ParralaxPro.
I'm sorry, this is apparently still unfolding as I try to gather as many details as I can, but I learned it isn't about the layers at all. Apparently it is just an issue with the lighting plugin, as once the kill switch is triggered via plugin command, opening the menu and closing the menu makes the game go black, even if layers plugin or other plugins are turned off.

Thank you for that also - I will check that out 🙂
Galv's Layer Graphics didn't have any issues with Terrax Lighting, you could go that route.
Thank you - originally I had gone with that, but I wound up paying the $15 for Khas - Advanced Lighting because I liked the look and functionality of it a bit better.
I've found Terrax lighting to have minimal issues with other plugins. Khas lighting is great, but does not play nice a lot of the time.

EDIT: if you payed for the Khas light plugin, and there is some kind of issue with just using that plugin alone, you should get ahold of Khas and see if he will fix it for you. What you describe sounds like some kind of error, it should probably not be behaving that way.
I'll try sending him an e-mail.
Can you replicate the problem in a brand new project? Or in his demo project?
I was able to reproduce it in a new project - and even the demo project Khas himself supplies on his website!
Hi there!
When you have a black screen, it is only on the map but you can still see the characters? Or everything is black?
Because it sounds to mee a cache problem, at first(IT'S A HINT).
Because when you get to the menu the scene changes, I think maybe it is related that when you leave the menu, and the game tries to load everything to the scene map, it can handle, then give black screen.
I have this issue once with galv layers, but it's not an issue with the plugin, it is just my parallax map is too big.
So maybe try to raise the cache to like 100, just for a test it.

But you already said that you test it in a new project too... so maybe it's a plugin conflict then. In this new project, you test the two plugins together, or only the Khas one?
Also, did you try to change the order in the plugin manager?

I don't know how you are doing lights, but I have tested several ones, and a lot of them cause conflict there and there or had poor performance. My way out is using the lights with images, creating them in gimp or photoshop.
It's an issue with lighting being off, don't use LIGHTING OFF and try just setting ambient light to 100 instead. I had this issue too, ended up giving up on the plugin because the framerate skips were just too annoying.
Hi there!
When you have a black screen, it is only on the map but you can still see the characters? Or everything is black?
Because it sounds to mee a cache problem, at first(IT'S A HINT).
Because when you get to the menu the scene changes, I think maybe it is related that when you leave the menu, and the game tries to load everything to the scene map, it can handle, then give black screen.
I have this issue once with galv layers, but it's not an issue with the plugin, it is just my parallax map is too big.
So maybe try to raise the cache to like 100, just for a test it.

But you already said that you test it in a new project too... so maybe it's a plugin conflict then. In this new project, you test the two plugins together, or only the Khas one?
Also, did you try to change the order in the plugin manager?

I don't know how you are doing lights, but I have tested several ones, and a lot of them cause conflict there and there or had poor performance. My way out is using the lights with images, creating them in gimp or photoshop.

Thanks for your reply!
I tested it in a new project using ONLY the lighting plugin.
When it went black, the map and the characters all disappeared (went black).

I actually got a bit more info on this.

When running the light plugin and the layers plugin at the same time, I get a frame drop every few seconds. The console log brings up this error:

[Violation] 'requestAnimationFrame' handler took 420ms

That just pops up every 5-10 seconds, with the ms changing slightly each time.

If I somehow disable the lighting plugin, it doesn't happen - no frame drop, no error message.
If I use the lighting plugin but no layers, it doesn't happen - no frame drop, no error message.
It's only when both Galv's MV Layers and Khas Advanced Lighting run together that this occurs.

Unfortunately both of these plugins are vital to my vision of the game. Layers are obviously necessary so that characters can pass under trees and other things, and there is no other plugin quite like this one... so I really hope someone who knows about javascript might be able to find some type of clue as to what, if anything can be done. It would mean a lot to me.

It's an issue with lighting being off, don't use LIGHTING OFF and try just setting ambient light to 100 instead. I had this issue too, ended up giving up on the plugin because the framerate skips were just too annoying.

You are likely right, but when I leave the ambient light on, I get the frame drop (jitter) problem that you also seem to have encountered. I really hope I don't have to give up yet, and maybe if we are lucky someone here can give some insight so we can use both plugins together.

Original thread: https://forums.rpgmakerweb.com/threads/ive-been-working-on-my-game-for-years-and-hit-a-wall-i-cant-seem-to-overcome-its-an-issue-with-khas-advanced-lighting-plugin.121091/