Having trouble with lag (probably due to old script)

Status
Not open for further replies.

Kbrito6

RMXP Dinosaur
Member
Joined
Dec 21, 2018
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMXP
My game (RMXP) hasn't been touched in about 10 years and I just decided to try to fix the problems that made me stop working on it.
It lags... A lot... At first it's not enough to hinder the experience, but later on the more you play, the more it lags. I need someone to look at my scripts and help me solve this.

(People I've spoken to in the past have said that the problem is probably in the battle system script)

This is probably some complicated work, so I thank whoever wants to help me in advance.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,731
First Language
English
Primarily Uses
RMVXA
Scripts is where people who have written a script they want to share with the community can post it.

[move]RGSSx Script Support[/move]
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,341
Reaction score
1,364
First Language
Spanish
Primarily Uses
RMVXA
but later on the more you play, the more it lags

probably some object keeping record of many things at once without optimizing, or the cache taking in too many images without cleaning itself.

does the lag continue if you save, exit, and reload?
 

DerVVulfman

Resident Werewolf
Veteran
Joined
Jun 26, 2012
Messages
315
Reaction score
155
First Language
English
Primarily Uses
RMXP
Lag caused by the battlesystem script would only happen within battle itself. Control passes from the map system (ie Scene_Map) into the battle system (Scene_Battle). So if your lag is happening within the map, I would very much doubt it was caused by your battlesystem.

HOWEVER, it may help if you provide a list of the scripts you are using, and the order they are within your Scripts Database. In some cases, script order may also cause issues as some scripts adapt themselves whilst others override and rewrite existing ones. This is referred as script conflicts.

Ten years? Please tell me it isn't from my old Animated Battlers from 2008. XD I musta made 150+ changes to it since then. XD XD XD XD XD
 

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
635
Reaction score
210
First Language
English
Primarily Uses
RMMV
It's a bit tricky to help without knowing exactly what's causing the lag. You're best bet would likely be to make a backup copy of the game, and start deleting scripts until you pinpoint the exact script or scripts causing issues.

From my experience, a good place to start would be with lighting/overlay scripts, as they can be pretty resource demanding, and if one of them isn't properly unloading images, you could definitely run into memory issues.
 

Kbrito6

RMXP Dinosaur
Member
Joined
Dec 21, 2018
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMXP
Hi everyone, thank you for the responses.

does the lag continue if you save, exit, and reload?
Yes...

Lag caused by the battlesystem script would only happen within battle itself.
I use Mr Mo's ABS (Lite, with some modifications) which is a Zelda-esque battle system, it is always active, there is no battle screen separate from the map.

HOWEVER, it may help if you provide a list of the scripts you are using, and the order they are within your Scripts Database.
I will gladly send my entire project or script database to someone willing to help me, maybe we can rule out obvious answers before trying to delete specific scripts. The game uses many different scripts (that could also be the problem) and it would be a little bit of work to detect exactly which script it is.

Ten years? Please tell me it isn't from my old Animated Battlers from 2008. XD I musta made 150+ changes to it since then. XD XD XD XD XD
I started the first version of the game in 2005, but stopped working on it in 2008 after running into these lag problems that nobody in the Brazilian forums could solve, maybe someone from the American community can help me.

It's a bit tricky to help without knowing exactly what's causing the lag.
You're right, but since the game uses many scripts that could be in conflict with each other, I would rather send the project to someone willing to open it and take a look.

From my experience, a good place to start would be with lighting/overlay scripts,
I always heard that lighting scripts caused lag, one of the reasons that I decided not to use any.
 

DerVVulfman

Resident Werewolf
Veteran
Joined
Jun 26, 2012
Messages
315
Reaction score
155
First Language
English
Primarily Uses
RMXP
MrMo's ABS is nice. Nice. But there are errors with MrMo's ABS that you are not familiar. I am. I used to promote the system, and continued development on his behalf, but I discovered an issue with his system you would be shocked to find.

FIRST, let me state that the issue you are having is the HUD system. It was nicely written, but didn't have the best TIMER control option.

NOW, what's the problem? A dang cheat. You could save during battle, reload your game, and the enemy is FROZEN!!!! HE WON'T ATTACK! There were faults like this with MrMo's ABS which is why I decided to start from scratch and crafted the Lycan ABS based on the very BASICs of the Near/Mo architecture.... more based on Jaime Webster's original work. Erm, that's Near Fantastica's real name btw.

You may wish to check out the Lycan ABS right now. I have two 'chapters' in the thread. Part 1 is sorta sword-based survival horror? Part 2 is a bit western styled. And you got grenades and bombs and more. And enjoy the opening credits. :D

https://forums.rpgmakerweb.com/index.php?threads/the-lycan-abs.36382/
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,341
Reaction score
1,364
First Language
Spanish
Primarily Uses
RMVXA
if the lag continues after reload, then the object causing lag is being saved and restored each time.
you'll need to debug the scripts that create new objects, and of those, those which store a lot of data.

not hard to do, but it'll depend on your knowledge of the code.
 

Kbrito6

RMXP Dinosaur
Member
Joined
Dec 21, 2018
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMXP
FIRST, let me state that the issue you are having is the HUD system. It was nicely written, but didn't have the best TIMER control option.
Mine has a re-written HUD, maybe the original HUD is still active in the background, I don't know.

not hard to do, but it'll depend on your knowledge of the code.
That is the problem, I was the leader and creator of the project back in the day, but the scripts were created by two different people in the team and I was given instructions as to how to create the game around those scripts. I have very basic knowledge of RGSS, that's why I am here asking for help lol.

---

Would any of you be interested in opening the project and taking a quick look?
 

DerVVulfman

Resident Werewolf
Veteran
Joined
Jun 26, 2012
Messages
315
Reaction score
155
First Language
English
Primarily Uses
RMXP
Would any of you be interested in opening the project and taking a quick look?
Yup.

But take into consideration the bug I stated was within MrMo's original, the cheat which I mentioned. Unless you make it so the player cannot save during combat, he can easily trounce the enemies just by saving and reloading. The bug was very much embedded and I couldn't remove which is why I chose to craft 'Lycan'.
 

Kbrito6

RMXP Dinosaur
Member
Joined
Dec 21, 2018
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMXP
Yup.

But take into consideration the bug I stated was within MrMo's original, the cheat which I mentioned. Unless you make it so the player cannot save during combat, he can easily trounce the enemies just by saving and reloading. The bug was very much embedded and I couldn't remove which is why I chose to craft 'Lycan'.

Thanks! What would be the best way for me to send it to you? Maybe it's best you send me a PM. Regarding the cheat: My game only allows the player to save at specific NPCs, so that's not really an issue.
 

DerVVulfman

Resident Werewolf
Veteran
Joined
Jun 26, 2012
Messages
315
Reaction score
155
First Language
English
Primarily Uses
RMXP
Well.... My upload site of preference is Box.Com, and you can send me a PM for the link. Mediafire is being a jerk with anyone with AdBlockers, and I FLATLY REFUSE TO TURN THEM OFF!!!!! *sigh*... enough of that rant. :p

Glad to hear you have something already considered to ward off the cheat. I drove someone nuts because MY game has a Menu-in-Maps function which meant the action continued when he brought up the EQUIP menu. XD He thought the action would pause so he could change weapons and got thoroughly BEATEN UP!!! He saw the zombies just wailing away on him! That's a different system and takes more time to configure.

Insofar as how long it might take me. Be ready for a laugh.

I'M THE DIALUP KING! If you ask around.... yeah, those who know me know that I still use a dialup service for well over a decade. AOL! So downloads might take some time.
 

Kbrito6

RMXP Dinosaur
Member
Joined
Dec 21, 2018
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMXP
I'm currently on holiday with my family and will be back in a couple days, I'll send you the link when I get to my computer again. I'm also translating some important areas of the game so you can test it (the game was originally made in portuguese).

DIALUP!?!?! WHY!? Nostalgia?
 

DerVVulfman

Resident Werewolf
Veteran
Joined
Jun 26, 2012
Messages
315
Reaction score
155
First Language
English
Primarily Uses
RMXP
Got no problems with Portuguese. Found some of my scripts in some Portuguese sites. Seriously, if I translate scripts from Japanese... that shouldn't be much of a problem.

Reason: Dialup saved the site! Long story short, a former server host (private person) decided to hold a site hostage because he didn't like a new staff member being appointed. He locked every staff-member out perceived as a threat, including the forum owner. ROFL, the guy with dialup wasn't, and downloaded the entire forum for the owner in a NIGHT!
 

touchaer

Warper
Member
Joined
May 7, 2019
Messages
4
Reaction score
0
First Language
english
Primarily Uses
N/A
It's a bit tricky to help without knowing exactly what's causing the lag. You're best bet would likely be to make a backup copy of the game, and start deleting scripts until you pinpoint the exact script or scripts causing issues.

From my experience, a good place to start would be with lighting/overlay scripts, as they can be pretty resource demanding, and if one of them isn't properly unloading images, you could definitely run into memory issues.
wow thanks bro
you help alot
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,267
Reaction score
5,444
First Language
Dutch
Primarily Uses
RMXP

touchaer, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Paid material WIP~
EysZO9cVEAEWy9W

This is Alchemy pack.
I decided to add more witch elements.

Now we have wooden props, candles, pots, and potion bottles.
We also want to add herbs, kettles, fireplaces, etc.
First posts! Maybe I can use this update?
Using MV here: can i move blocks around in the event page and i'm just too stupid to do it or does it only look like you should be able to do it and i would always need to cut and paste?
Aba, aba chgb rtb fhz.
Ubp rfg hahz qr snohyvf srpv, cbfg bzarf.
Rtb vhfghf ibyb hg ivtvyb ubp hahz rk yhqb.
Qbarp fvathyvf yhqvb yhqvhf cbgrfg, aba zntvf.

Streaming Anterograde Fantasy, a new game I'm working on

Forum statistics

Threads
110,384
Messages
1,052,877
Members
143,439
Latest member
homeless
Top