Ok, guys... please, listen to me because i think that i found a very strange problem.
In my little game I am using many many plugins. An annoying problem that I run into every now and then, is that sometimes, when I switch to a new scene, for example the main menu or the save menu, or a bit heavy map transfer, I run into an annoying problem , that is, the game starts not running smoothly as I move around the screen, and if I go to see the fps, it gets stuck at 30.
Magically, if I close and reopen the menu, the problem is solved and the fps goes back to 60.
I've done countless tests, trying to figure out who the damned is, deactivating all plugins, and ... I don't know guys, it just seems to be this script...
WITH ONLY THIS SCRIPT: The problem appears with much more difficulty. But it happens.
With light AND yanfly, appears much more easily.
Without no plugin: Even closing and opening scenes a thousand times, it is easier to crash the game than to see the fps drop and freeze at 30.
If you try to slightly load a scene, when the screen closes, the fps remain locked at 30.
I did this test like this:
- Yanfly Core Plugin
- Yanfly Save Engine
- Community Light
A GIF for you... plese, see the link here:
https://ibb.co/DLFYc0M
The map in this case is small, but if I tried to move in a scrolling map, you would have noticed the lag of the locked 30fps.
Many times the whole game crashes if you close and open quickly either the main menu, or the save menu (Even without plugins, this is not normal, but... it's rpg maker, i think that it's a bug :/ ). But the fps block, apparently, only freezes me if I run the test with the lights script and I repeat, it often happens if you start to weigh down the scenes themselves, such as menus.
For achieve the problem fastly, you have to quickly open and close, for example, the save menu, with the save core engine that "It weighs down the save screen a bit, with drop fps" (perhaps using an event with the command "open save screen" and then pressing esc. Just like what i did in the GIF.
You can even open and close the main menu. It also happens in that case.
Now, I don't care if the game slows down for an instant.
I am interested in understanding why the engine blocks the entire game at 30fps, and it seems to do so when the community light is active.
I have done countless tests without the community light and the game has always crashed, but without ever getting to the block of the fps.
I think this thing triggers when the game gets heavy for an instant, doing certain things.
Now this is a way to trigger the problem, but during the various playtests, I have often noticed this problem, without obviously having to close and open the menu a thousand times.
Another interesting thing: Initially I was testing the scene in a room with 4 lights inside. And it happened.
I tried to create a new area, placing only the crystal light and I could not get the problem out.
The moment I added the three lanterns, the problem started popping up.
Now, you will say: but who opens and closes the menu so many times ...
Correct, but this problem sometimes happens even by simply opening and closing a single window, or when moving to a heavy map, with parallel animations or processes. I remember this happening many times in the past, and I used the Terrax script.
This is just a way to show you how it turns out, forcing it and going to find out just what happens.
Does something come to mind? I really don't know what to say.
Do I know this is a strange enough problem, and perhaps even difficult to replicate? Try it ...