Help - Search - Members - Calendar
Full Version: Lag caused by Audio
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
Decedent
It may fix itself after creating the game file, but when testing in game, if I have silence and have an event start playing BGM or ME (the last one is a bigger problem) part way through a scene, the game lags for a second or two before resuming. Is this normal?
Jens of Zanicuud
Are you using .mid files or .ogg files?

.ogg files can cause a massive amount of delay in RMXP. If they're too big, since the engine has to fully load them before playing them (this is the main lag cause).

In newset versions (RMVX, RMVXA) Enterbrain fixed this odd problem, but RMXP suffers from this...

As of today, I've never heard of MIDI files delaying a RMXP game.
If so, I have barely no idea...

Jens
Nub Cake
I'm not sure if it's of any help, and it will just add a bit more work to the game, but a Anti-lag script might be able to help, but im not sure.

Also, if you use .ogg files, as i did, i recommend to convert them to .mp3 as the .ogg files doesn't get "locked" for the install file, so when the players install the game they will be able to get the music files. This is due to what Jens mentioned, that RMXP wasn't made to read .ogg files. It's just a tip if you use it and don't want players to access it tongue.gif
Decedent
Some .ogg files yes, but I've had the problem for a while with the provided ME files like Fan Fare which is a midi... It only seems to be the first time I hear the song after freshly opening and testing that it freezes up though. After that, if I repeat the event it's fine so I guess it is an initial loading problem.

I got that anti lag script and I'll have a play through later and see if the problem persists, it may just be because I'm having to close and reopen the testing game every 5 minutes to fix something, and having one long run through would present no problems. Just thought I'd ask in case it was a common issue.

Thanks for the help happy.gif
Vexus
I guess your operating system is windows 7 right? if yes that is a problem I think everyone has with rmxp me included.

Only solution is to convert them from midi to something else no other solution sadly I could find working.
Night_Runner
@> Nub Cake:
In general, Anti-Lag scripts will stop the engine from updating the graphics of characters when they are not on the screen, and that's about it.
Don't get me wrong, when you have to load an insane amount of graphics which then need to be cropped to the calculated sizes and positions, and recoloured and affected by hue changes, ect. for characters that aren't even on the screen, it does take its toll on your computer. But I haven't seen an Anti-Lag script that will affect the Audio.
I've looked through the Anti-Lag script you linked, it's a standard "stop drawing graphics that aren't even on the screen" script.

@> Decedent:
As Vexus has mentioned, the lag is part of how RMXP handles .ogg audio files. I've seen scripts that override how to handle audio files, by using their supplied DLL files, which may be something to investigate. I haven't had much luck getting them to do anything for me, so I'll let you decide whether or not you want to pursue it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.