FPS & MS Spike Question

This is for MV.

I know there are, potentially, a number of things that can cause lag spikes, and I'm going to try disabling some plugins and test if any of that helps. Plus check for any parallel processes that may be running that don't need to be. Overall... my game feels like it runs great, but when I play and press F2 to cycle between FPS and MS... I'm seeing the following:

FPS: Overall, the game runs consistently at 60 FPS. However; when I transfer to another map... it does jump down quickly to about 30-40 and then immediately back up to 60. It stays consistent at 60 while exploring my maps. Is this normal for it to drop like that while transferring to another map?

MS: It's down around 1-2 (bouncing back and forth) while playing and consistently stays there as I explore my maps. However; just like FPS goes down when transferring to a new room... this spikes up to 300-500... after the transfer... it immediately drops down to 1-2 again. It's just a quick spike. However; I noticed yesterday... when testing my game... the longer I played, the MS started to spike to nearly 1000 when transferring. It ONLY happens when I'm doing a transfer event, though.

While I'm going to personally test a few things: turn some plugins off, double-check for any parallel processes running... I just wanted to see if you guys had any suggestions I may miss. Wouldn't a plugin cause the entire game to spike at random moments? Any idea why it's only doing this during transfer events?

Thanks in advance 🙂
1) on mapload, all resources from the map needs to be loaded at once (tilesets, map data, background music and so on. additionally all events need to chec for parallel and autorun and processed if yes, with a very common technique of running the events once at start of the map to set special data for the map.

so yes, it is normal to slow down on mapload

2) memory is handled by the automatic garbage collector which always waits if a resource is needed again before it gets deleted.
this goes double for loading a new map - the new map needs to be loaded before old map data from the previous map can be released. And that means that for a very short while you have two maps in RAM.

3) constantly increasing memory is usually a bug - a memory leak to be precise.
however you need to check that long-term: some resources need up to thirty minutes before they get released by the garbage collector.

If your memory needs increase over two or three hours, then you have a memory leak - if it goes back to normal before rising again then that is normal.


MV originally had a few memory leaks in its programming, but the last of these was removed by 1.4.0
If your core files are current (1.6.2) then the memor leak has to be in one of your plugins (there are a lot of memory leaks there). If you have an old core you need to update your project,
1) on mapload, all resources from the map needs to be loaded at once (tilesets, map data, background music and so on. additionally all events need to chec for parallel and autorun and processed if yes, with a very common technique of running the events once at start of the map to set special data for the map.

so yes, it is normal to slow down on mapload

2) memory is handled by the automatic garbage collector which always waits if a resource is needed again before it gets deleted.
this goes double for loading a new map - the new map needs to be loaded before old map data from the previous map can be released. And that means that for a very short while you have two maps in RAM.

3) constantly increasing memory is usually a bug - a memory leak to be precise.
however you need to check that long-term: some resources need up to thirty minutes before they get released by the garbage collector.

If your memory needs increase over two or three hours, then you have a memory leak - if it goes back to normal before rising again then that is normal.


MV originally had a few memory leaks in its programming, but the last of these was removed by 1.4.0
If your core files are current (1.6.2) then the memor leak has to be in one of your plugins (there are a lot of memory leaks there). If you have an old core you need to update your project,
This was really helpful. I'll check out some of my plugins and just mess around with turning them on/off to see which one (if any) may be causing it. One of my testers said the game crashed on them during a transfer event, so I do need to figure it out. That was super helpful. Thank you!
One of my testers said the game crashed on them during a transfer event,
are you using parallax maps?
Nothing short of parallax maps should make maps crash in a regular way, because only parallax maps need a large amount of memory.

if you are using large parallax maps, then you might consider placing a small map between the big maps - that way you'll never need the RAM for two big maps at the same time, only a small and a large map (remember the point of having the previous map still in RAM until the new map is fully loaded)

If you aren't using parallax maps, then the crash has most likely nothing to do with memory but with something else.
are you using parallax maps?
Nothing short of parallax maps should make maps crash in a regular way, because only parallax maps need a large amount of memory.

if you are using large parallax maps, then you might consider placing a small map between the big maps - that way you'll never need the RAM for two big maps at the same time, only a small and a large map (remember the point of having the previous map still in RAM until the new map is fully loaded)

If you aren't using parallax maps, then the crash has most likely nothing to do with memory but with something else.
I'm not using any parallax maps in my game. I'm guessing it's a plugin (potentially) or a design flaw (def something I've done more than likely). I'm going to test a few things, but I wanted to reach out here in case there's something you guys would recommend that I may overlook. I'll keep testing and (hopefully) figure it out.

It isn't horrible. Just a tiny spike and isn't crashing a ton, but I def need to figure it out. Thanks for the help!

Original thread: https://forums.rpgmakerweb.com/threads/fps-ms-spike-question.154503/