Fixing the lag [Khas Awesome Lights]

So, a while back I released my game and was kinda surprised that a number of people had problem with lag from the script I'm using (Khas Awesome Lights).

I never thought anything of it cause I never really experienced any major or game breaking lags when playing it myself, and I have a bad computer, so I thought that if mine could handle it, others could too.

Alas, this doesn't seem to be the case. The easiest way to fix this would've just been to redo rooms etc, but if you read the thread, I state clearly that I am finished with this project. Fixing bugs is one thing, but redoing the whole game is not something I have the energy for anymore.

I know this lag issue is probably something that cannot be fixed unless doing what I stated above, but it's better to ask than not in my case.

Link to the script:

http://forums.rpgmakerweb.com/index.php?/topic/4917-khas-awesome-light-effects/

I've already added one anti lag and one anti animation lag script to help cope (by Moghunter), and it did smooth things out (at least for me) but not enough.

Thanks for reading.
Lighting scripts are innate hoggers of performance due to how they handle things just to achieve the light effects. You cannot really do much about it, this is why we do suggest not using lighting scripts unless you need dynamic lightings. If all you need are static lights, overlays would produce a much better effect and without the processing needed by the lighting scripts.


You could still maybe try to get the Effectus script if you have the money for it, but better ask the creators first if they have experience using it on maps that uses a lighting script.
There is a program called Effectus that I have been hearing about that is supposed to heavily reduce lag.
Thanks, I will look into this Effectus. Might be something.

EDIT: So I've checked it out. Seems like an amazing thing tbh, but $20 for one project? I mean, I HAVE the money for it and I am thinking about buying it, but still.

I checked the comments and found this: "Regarding compatibility with Light Effects scripts, yes, it is compatible." (When asked about scripts like Khas')

I'm still reading through the fine print. Seems like it's no worries about using it as long as I encrypt the game (like I've always done anyways so).

On another note, anyone have experience with Effectus?

Anyway, thanks for helping me, you guys have been a big help.
While yes, it would seem a bit much for one game, it is something that you would have the rights to for any other games as well.
yeah, isn't it usable in all projects once bought?
While yes, it would seem a bit much for one game, it is something that you would have the rights to for any other games as well.
yeah, isn't it usable in all projects once bought?
Yes, this would seem to be the case. Again, thanks for the reply.
Isn't Effectus more, well, effective about lag caused by a large number of events?

Lighting scripts are slow because of the nature of Ruby (interpreted language). I doubt it'll speed up things regarding this issue.
Good question. You could always contact the developer about it, though.
Isn't Effectus more, well, effective about lag caused by a large number of events?

Lighting scripts are slow because of the nature of Ruby (interpreted language). I doubt it'll speed up things regarding this issue.
That is actually true. I will try and contact the developer about this, thanks.
From what I've seen and read on the page, it improves aspects of how the game manages some of the process heavy things. From what I've learned in the past around here in the forums, lots of events causes lots of lag because each event also creates 1 sprite. Even if the events aren't updated (which what most anti-lag do), they still take quite the processing power because of some underlying things that the engine does to sprites. So the key to improving processing is to find out those and improve upon them.


Which basing from the description written on the script page, is what the script actually does. That is also why most anti-lags can only do so far, because they only make events not get updated if not in range. If that's what the only thing that Effectus does, then it wouldn't be able to speed up games in which the visible map has a HUGE number of events since it will still process those HUGE number of events. And if you look at the samples, some of them have maps filled with a HUGE number of events. So surely, it does something grander.
From what I've seen and read on the page, it improves aspects of how the game manages some of the process heavy things. From what I've learned in the past around here in the forums, lots of events causes lots of lag because each event also creates 1 sprite. Even if the events aren't updated (which what most anti-lag do), they still take quite the processing power because of some underlying things that the engine does to sprites. So the key to improving processing is to find out those and improve upon them.

Which basing from the description written on the script page, is what the script actually does. That is also why most anti-lags can only do so far, because they only make events not get updated if not in range. If that's what the only thing that Effectus does, then it wouldn't be able to speed up games in which the visible map has a HUGE number of events since it will still process those HUGE number of events. And if you look at the samples, some of them have maps filled with a HUGE number of events. So surely, it does something grander.
That's true, but even if Effectus only effects events and huge maps and not the light script, it could still help. Reducing lag from one thing and the lag overall will get better, is how I see it.

I'm still waiting for an answer from the developer, and this could take a day or two. Like I said, I have the money for it, but confirmation would be nice, so I'm waiting with buying until then.
That's true, but even if Effectus only effects events and huge maps and not the light script, it could still help. Reducing lag from one thing and the lag overall will get better, is how I see it.

I'm still waiting for an answer from the developer, and this could take a day or two. Like I said, I have the money for it, but confirmation would be nice, so I'm waiting with buying until then.
Hello! I just replied to your comment at the website's comment section. Short answer: Yes, it will help. Long answer is in the website's comment section. 🙂
Khas is working on a new lighting script. If you can wait for a bit, I'm sure he'll release it ASAP.
Hello! I just replied to your comment at the website's comment section. Short answer: Yes, it will help. Long answer is in the website's comment section. 🙂
Well, I guess I have my answer. Marking your answer as solved too.

Khas is working on a new lighting script. If you can wait for a bit, I'm sure he'll release it ASAP.
While that would be nice, let's be honest, the lightning script isn't the only thing that is making the game lag.
I wonder if that will include a new mechanism (which is hopefully faster) instead of the ones we currently use to apply lighting... 
The entire script was rewritten from scratch - I have developed and implemented several techniques to increase performance. The main one is that the new script uses a custom dll (written by me) to handle light and shadow rendering, which reduced the drawing time to about 57% of the previous duration. Also, I'm writing a settings menu so players can change them to suit their machines.
Oooh... Awesome... I wish I could write a dll too... XD
The entire script was rewritten from scratch - I have developed and implemented several techniques to increase performance. The main one is that the new script uses a custom dll (written by me) to handle light and shadow rendering, which reduced the drawing time to about 57% of the previous duration. Also, I'm writing a settings menu so players can change them to suit their machines.
Should we expect this to go on your blog? D:
@Korten12


Yes! The release will be announced in several ways 😀

Original thread: https://forums.rpgmakerweb.com/threads/fixing-the-lag-khas-awesome-lights.36194/