Help - Search - Members - Calendar
Full Version: Major lag while displaying text in battle.
RPG RPG Revolution Forums > Scripting > Script Development and Support > RGSS
mast3rshake2049
Ok, so i made a cut scene that involves a battle that you have to lose. and at the beginning of this battle theres a little bit of text, just the characters dissing eachother before the fight.

Now the problem is that while the text is being displayed the game lags horribly. so much so that the text window literally lags while fading in. As soon as the little chat is over and the fighting begins as normal the lag disappears and the game continues to run smooth. Now this really confuses me as displaying text should be one of the easiest things for the game to do! I have also tried using different triggers to get the text to appear and they all have the same effect.

Does anyone have any ideas as to why this might be happening? I have had lag issues before and they were related to limit breaking the database and common events. (it turns out the game continuously loads and rechecks all common events even when not in use!) So to counter that lag i have drastically reduced the number of common events i have. (its currently at the regular limit of 999) And after reducing the number of common events i have had no lag issues....until this battle text lag that is. Could the database limit break have anything to do with this? i dont see why it would. Or perhaps i have to many troops in the DB? (its capped at 6000) But i dont see why it would as during that battle it should only have to access that specific troop and the other 5999 should be irrelevant. (and they seem to be once the text disappears.

So thank you in advance for any help.
Night5h4d3
First off, are you using the official legal version of RMXP with no modifications? all 'caps' in the database should be at 999.
Secondly, if you are, then the issue is likely something with scripts, do you have any custom scripts that make changes to Scene Battle?
Atoa
@Night5h4d3
There is an script made by Woratana that allows to break the database limit event on legal rmxp.

@mast3rshake2049
Many common events will cause lag, since *every frame* it loops throug all common events when updating events. So let's say you have 1000 common events, it will make 40000 cheks on the events every second.

Also, if you're using any custom script, it may be refreshing the message window too often (I.E every frame) wich can cause lag, since the draw text method is quite slow.
mast3rshake2049
Yes i am using a few custom scrips, however i dont think any of them should affect the text display. (at least not that i know of, i know little to nothing of scripting)

The scrips i am using are

- Night_Runner's Incrementing SP Script.

- Catergorized Items Menu by albertfish

- extra accessori slot mod

- COGWHEEL Plug 'n' Play Menu Bars (based on Syvkal's revisions)

- Solo Player Custom Menu System v0.6 by taiine

I have not modified any of the scene battle scripts so those should be at their defaults.
Thank you again for any advice. And also yes i have the legal version of rpg xp.
Atoa
did you test if the lag occur without the scripts? If you don't have lag without them, they're are to blame, so you should test each script to find the one that's causing the issue.
mast3rshake2049
QUOTE (Atoa @ Jul 4 2011, 04:24 PM) *
did you test if the lag occur without the scripts? If you don't have lag without them, they're are to blame, so you should test each script to find the one that's causing the issue.



O.....M.....G........i cant believe i didn't do this. and iv worked 3 years at various call centers! I promised my self that this would never happen to me. I broke a blood oath to my self that i would never actually become a customer! Troubleshoot 101 how could i forget. lol

Thank you good sir for your echoes of wisdom smile.gif

EDIT: wouldn't you know it. Turns out to be a prob with COGWHEEL Plug 'n' Play Menu Bars (based on Syvkal's revisions) by DerVVulfman . The battle went smooth as silk without this script. What command/s should i look for to fix this?

P.S. sorry if off topic, but what would be a good place to start learning about scripting in general (for rpg XP) like maybe some youtube vids or a thread in this forum i haven't stumbled across yet? Thank you once again.
Atoa
It's probably something at the def update of Scene_Battle, if the bars are visible during battle probably they're refreshing every frame (clearing and drawing bars every frame + the draw text can be quite laggy)
Post the code, it will be easier to find the culprit x]

Gubid made some ruby tutorial videos: http://www.hbgames.org/forums/viewtopic.php?f=11&t=74398
I haven't watch it, but people say that it's quite good.
Redd
Moving to RGSS Script Support as this now has to do with scripting.
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.