Game Lag and BGM Delay

Hi there!

Sometimes, when I playtest a project, the game get's lagged.

Also, the BGM delays a bit to play.

I don't know what is causing this issue, but it's something that happened since the first time I downloaded the 1.5.x demo version.

Now I'm using the Steam 1.6.1 version. The overall performance seems a bit better from the last time I used the engine though.
Do you have a wait or another music before the one that have a delay ?
Do you have a wait or another music before the one that have a delay ?

When I start playtesting the game, the tittle menu waits about 2-3 secs before start playing, this also happens when I choose "start game" and the first map music also take that long to start playing, the same with battle, etc.
An audiofile needs to be completely loaded before it can be played.
That is the delay you get - the wait until the file is in memory.

There are only two ways to reduce that time
1) preloading (which has other problems and is not possible on the title screen itself)
2) reducing file size of the BGM file
@Andar , I'm using the RTP and BGM packs I purchased from Steam.
I'm using the OGG files, is there anything else I can do to reduce their size?

And the "gameplay lag", there's something I can/should do to optimize the game performance?
You can achieve that either by reducing the size of BGM file or by preloading that file.


-------------------------------------------------------------
Top Discord Bots
You can achieve that either by reducing the size of BGM file or by preloading that file.

How do I preload a BGM? 😳
If your game's running slowly after an update, copy the project folder to create a backup, then (using the plugin manager) remove all of your plugins. Run it and see if that fixed it. If so, start adding them back in, one at a time, and see if any of them cause lag. If not, set all the settings back to what you had before and they should be fixed.

When my project started lagging to the point of being unplayable (around the 1.6 update) that sort of "plugin refresh" made the lag go away completely. Maybe that'll fix it? If not, well...that's why you made the backup.
There are several plugins you can use for preloading such as SumRndmDde's Preloader Core.

You can also try this plugin for audio lag: https://forums.rpgmakerweb.com/index.php?threads/audio-lag-fix.73031/
Although, it has some issues such as audio fade delay. The latest version (v0.82) has an error in the code which causes games to crash, although on page 5, there's a reply on the topic that has a fix for that (Otherwise use v0.81).

Original thread: https://forums.rpgmakerweb.com/threads/game-lag-and-bgm-delay.97486/