The back story is a bit cliched: I just got RPG Maker VX Ace and have started making my first game. I am noticing that my scenes appear to be lagging and I don't know how to fix it.
I suspect the ending will be predictable: "Er... why didn't you read thread X, because we explained how to fix your lag problem there." But, having read about five such threads and making an attempt to implement their solutions hasn't yielded the results I'm hoping for. And, I'd like to get to root cause before I make the vast (well, large 😉 ) number of maps I intend because fixing them all post facto would be quite a chore.
Here's what I've gleaned (and attempted to do) so far:
- Avoid parallel events wherever possible. If you must have them, control when they are running using conditionals gating execution of event pages. I believe that I've only got one or two parallel events running at any given time and they aren't terribly complicated.
- If you must have parallel events, insert Wait commands that will happen on each execution. I've stuck in Wait(20) commands for all of them that run on each event page execution.
- Delete old events. All events remove themselves when they aren't needed anymore - especially the parallel ones. The deletions are all autorun, rather than parallel ... although I suspect that doesn't really matter much since they're all gated on event page conditionals. So, the parallel events would only execute for a single frame before they remove themselves.
- There was some memory leak around message windows. HimeWorks presented a solution and I aliased that over the default methods for the map scene and battle scene.
That's the big stuff I gleaned. Are there things I missed?
Most maps seem to exhibit the problem and it seems to get worse as I play a map. The effects become visible within about 3-5 minutes, though, so it doesn't take too long.
Here's the big things that I think could be a problem:
- The map is possibly somewhat large? It doesn't seem like its huge, based on sizes I saw in other posts. Its 100 x 50.
- The map has a large-ish number of events? Although not insane: ~130
- Many of those events have Custom move routes that are basically: wander in a random direction within a specified region (using Galv's random_region method). Do custom move routes like that end up making an event look like a parallel event or will they not be executed unless they are within the 'nearby' threshold?
- Some random script I have installed. I've accumulated quite a few and written a few myself. Most seem pretty standard... but are there gotchas that lead to memory leaks or known bad scripts? I can give you a list of them all.
The fact that it gets slowly worse makes me leap to a memory leak, although the process memory (at least in task manager) appears quite stable. I've looked around for any sort of profiling tools and come up with nothing - do such things exist? Failing that, do you have any suggestions or help to offer? I would be happy to offer you screen shots or just send along the entire game project if that's useful.
Thanks for whatever help you might be able to offer!
I suspect the ending will be predictable: "Er... why didn't you read thread X, because we explained how to fix your lag problem there." But, having read about five such threads and making an attempt to implement their solutions hasn't yielded the results I'm hoping for. And, I'd like to get to root cause before I make the vast (well, large 😉 ) number of maps I intend because fixing them all post facto would be quite a chore.
Here's what I've gleaned (and attempted to do) so far:
- Avoid parallel events wherever possible. If you must have them, control when they are running using conditionals gating execution of event pages. I believe that I've only got one or two parallel events running at any given time and they aren't terribly complicated.
- If you must have parallel events, insert Wait commands that will happen on each execution. I've stuck in Wait(20) commands for all of them that run on each event page execution.
- Delete old events. All events remove themselves when they aren't needed anymore - especially the parallel ones. The deletions are all autorun, rather than parallel ... although I suspect that doesn't really matter much since they're all gated on event page conditionals. So, the parallel events would only execute for a single frame before they remove themselves.
- There was some memory leak around message windows. HimeWorks presented a solution and I aliased that over the default methods for the map scene and battle scene.
That's the big stuff I gleaned. Are there things I missed?
Most maps seem to exhibit the problem and it seems to get worse as I play a map. The effects become visible within about 3-5 minutes, though, so it doesn't take too long.
Here's the big things that I think could be a problem:
- The map is possibly somewhat large? It doesn't seem like its huge, based on sizes I saw in other posts. Its 100 x 50.
- The map has a large-ish number of events? Although not insane: ~130
- Many of those events have Custom move routes that are basically: wander in a random direction within a specified region (using Galv's random_region method). Do custom move routes like that end up making an event look like a parallel event or will they not be executed unless they are within the 'nearby' threshold?
- Some random script I have installed. I've accumulated quite a few and written a few myself. Most seem pretty standard... but are there gotchas that lead to memory leaks or known bad scripts? I can give you a list of them all.
The fact that it gets slowly worse makes me leap to a memory leak, although the process memory (at least in task manager) appears quite stable. I've looked around for any sort of profiling tools and come up with nothing - do such things exist? Failing that, do you have any suggestions or help to offer? I would be happy to offer you screen shots or just send along the entire game project if that's useful.
Thanks for whatever help you might be able to offer!