PresaDePrata

Veteran
Veteran
Joined
Dec 4, 2014
Messages
90
Reaction score
18
First Language
Portuguese
Primarily Uses
RMMV
Hi folks,


i'm testing some MV features and plugins (mostly Yanfly's) on a browser deployed game. It's actually a test but already have the core of what i pretend to do. I understand that some plugins might be interfering with other. Maybe some closure not done correctly, some namespace being copied over and over. These kind of js stuff, i don't really know. I haven´t digged on mv's core js yet.


The point is, while my game works flawlessly on my dev machine ("it works on my machine"), in the browser version the fps drops to an average of 30 to 50, but sometimes fall to 8 or 14. Which makes the game almost unplayable. So, removing plugin conflicts, what are the common causes for browser fps to drop?


I don't truly mind the loading time (i'll work on an application cache afterwards). I already know that on pixi2/3 the tileset redraw causes this drop, but on a large desert map i have with absolutely no animated tile, the fps drops below 20. It's the most unevented map i have however the largest on size. Which made me wonder if the map size has an optimize threshold or something like it.


Also, my game's resolution is 1280 x 720 (courtesy of Yanfly Engine Core).
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,123
Reaction score
8,002
First Language
German
Primarily Uses
RMMV
Check your common events in the database and see if you accidentally switch one to parallel process but leaving them without content.


The worst cause for FPS-drops and lag are badly designed parallel processes. Because without waits, parallel processes are executed once per fram - sixty times per second, even if there are no commands or nothing that requires that much checking.


And each computer has only a limited but different excess power before the lag becomes visible - a good developer's machine can handle half a dozen empty parallels without a drop, but a medium-class machine will drop the FPS after one or two empty parallels.


So best solution is not to have too much parallel processes.
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,634
Reaction score
1,452
First Language
French
Primarily Uses
RMMV
Hi folks,


i'm testing some MV features and plugins (mostly Yanfly's) on a browser deployed game. It's actually a test but already have the core of what i pretend to do. I understand that some plugins might be interfering with other. Maybe some closure not done correctly, some namespace being copied over and over. These kind of js stuff, i don't really know. I haven´t digged on mv's core js yet.


The point is, while my game works flawlessly on my dev machine ("it works on my machine"), in the browser version the fps drops to an average of 30 to 50, but sometimes fall to 8 or 14. Which makes the game almost unplayable. So, removing plugin conflicts, what are the common causes for browser fps to drop?


I don't truly mind the loading time (i'll work on an application cache afterwards). I already know that on pixi2/3 the tileset redraw causes this drop, but on a large desert map i have with absolutely no animated tile, the fps drops below 20. It's the most unevented map i have however the largest on size. Which made me wonder if the map size has an optimize threshold or something like it.


Also, my game's resolution is 1280 x 720 (courtesy of Yanfly Engine Core).

all windows.


example if you use plugin draw Window, but i may this will be fix when pixi4 core will release.


parralelle processe run good for me.


only when call windows.
 

PresaDePrata

Veteran
Veteran
Joined
Dec 4, 2014
Messages
90
Reaction score
18
First Language
Portuguese
Primarily Uses
RMMV
I see. What's odd is when in battle everything is fine. And to my layman understading, it's where the heavy graphical processment is made! I checked my common events and parallel processes, but none seems to be executing indefinitely. Again, it may be the plugins i put together.


Anyway, anyone else has some wisdow drops to share? :)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,123
Reaction score
8,002
First Language
German
Primarily Uses
RMMV
What's odd is when in battle everything is fine. And to my layman understading, it's where the heavy graphical processment is made!



No, that isn't odd - the battle is in its own screen (like a menu screen) and the entire game map (with all parallel processes) is stopped while in battle. The fact that parallel processes are stopped while in menu or battlescreen is one of the features that even is used to make events react to the end of menu or screen.


So if battles don't have lag for you, then that strongly suggest that the lag is either caused by parallel proceses, by too many events on the maps (>several hundred) or by plugins that primarily affect map functions.
 

PresaDePrata

Veteran
Veteran
Joined
Dec 4, 2014
Messages
90
Reaction score
18
First Language
Portuguese
Primarily Uses
RMMV
No, that isn't odd - the battle is in its own screen (like a menu screen) and the entire game map (with all parallel processes) is stopped while in battle. The fact that parallel processes are stopped while in menu or battlescreen is one of the features that even is used to make events react to the end of menu or screen.


So if battles don't have lag for you, then that strongly suggest that the lag is either caused by parallel proceses, by too many events on the maps (>several hundred) or by plugins that primarily affect map functions.



Hummm i thought something must be paused for all that battle's smoothness. So @Andar, you're saying that maybe is something affecting the map? I noticed that my overview world were lagging badly but read about the animated tile redraw memory leak. And i don't have any maps with more than 30 events, which may point to some plugin. Maybe the ones that creates overlays over everything? Like those with lighting and stuff?


But thanks. I wish i understood more about how rpg maker mv works in background.


EDIT: Also, what is the maximum map size for decent performance? I mean the map only with maybe 10 events . Juts to know.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,123
Reaction score
8,002
First Language
German
Primarily Uses
RMMV
With only 10 (non-parallel) map events, any mapsize with a regular map should work without lag.


A difference is if you're using parallax mapping instead of regular mapping? In that case the parallax size will cause problems if it is too large.


Or you should check if you updated the project? Updating the editor will NOT update older projects, only future new projects. That is because Degica can't know what you might have changed in the engine code yourself, so you need to manually update your older projects. If you didn't, they may contain the old errors
 

PresaDePrata

Veteran
Veteran
Joined
Dec 4, 2014
Messages
90
Reaction score
18
First Language
Portuguese
Primarily Uses
RMMV
Thanks @Andar for the answer. Well, no i'm not using parallax mapping. As i said this is only a test, altough contains almost everything i'll use on the final project. I did it speciffically to cut out any early problems with plugins, events or other related stuff. And also no, i bought MV two weeks ago on version 1.2.0 already, during that steam sale.


As for parallel processes, i set messages on them (altough i could use console.log, which occurred me now) exactly for the purpose of knowing how many times they are being called.  I'm checking plugins right now, but first i wanted to narrow down other possible problems before checking plugin by plugin. 


EDIT


While testing plugins, i noticed that opening and closing the menu, several times, brings the fps to unbearable levels. 
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

I have an idea, I am making low polygon 3D resources for a package in itch. but it occurred to me that I could export these as images and make MV / MZ compatible tilesets. What do you think of this?
I hate seeing threads where less-experienced user's ask for an opinion of their project, and the thread is full of negative feedback by others who are clearly not the target audience. I feel bad for the OP, and I hope they understand that no game can appeal to everyone. :frown:
Hm, just found out I can't use loops, yay.
-Ele
I just wanna Covid to be over and I have my normal life back... Feeling so bad these days, what can I do?

Forum statistics

Threads
109,074
Messages
1,041,859
Members
141,572
Latest member
Romull01
Top