Lag issue

frederik850

Villager
Member
Joined
May 17, 2014
Messages
91
Reaction score
1
First Language
dutch
Primarily Uses
After I implented jet's Pathfinding script I playtested the game and a few moments later there appeared a syntax error. I know it's because I used the comment wrong. Right now, I already deleted the script and I won't be using it anymore. But the problem my game has a ton of lag ever since. I've tried some anti-lag scripts but they don't seem to work. Re-installing the game or disabling the scripts doesn't work either.Other projects seem to be affected as well. Anyone know how I can solve this issue? Also I have a good framerate.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Lag can be created by different causes, and the anti-lag-scripts can only solve a part of those causes, they cannot magically remove every lag.


Your task is now to find out what causes the lag in your project. And that requires several tests.


1) Download the sample game Crysalis and play it. Does that lag? If yes, then the lag is cause by background programs working outside RM, or simply by limitations on your hardware (if it worked before on the same computer, it won't be hardware issues but it could be interference by other programs.


2) If Crysalis works, then the cause of the lag is in your project. Make a new map, perhaps using one of the smaller sample maps. Place your starting point in it but DON'T place any events there. Perhaps a few random enemies for testing in map properties, but no events.


Playtest on that map - does it lag or not?


If not, the cause of the lag is map-specific


If yes, the cause of the lag is either in the common events or in the scripts.


3)


Use this info to check for parallel process events (common or map), and in any such event you find, place a wait(60) command at the beginning of the parallel process. Playtest regularly - if the lag is suddenly gone, you'll know that one of the parallels you placed a wait inside since the last test is the one causing the problems.


Remove and add wait commands until you know which events cause a good part of your lag, then post screenshots of those events here to look for help.


It might be that several events cause each a part of the lag, then you have to search on after solving one problem - but please, don't list everyone of your events here for us to check, check them yourself with the wait test before...
 

frederik850

Villager
Member
Joined
May 17, 2014
Messages
91
Reaction score
1
First Language
dutch
Primarily Uses
Thanks for the help and tips. I am gonna try these out and post the results later on. One more thing: Is it possible that just the syntax error caused the lag, cause I've tried different projects and maps and the lag keeps returning. So it's definitely not caused by an event or map(I think). And were can I download Crysalis?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Crysalis is the sample game from this site, just look through the downloads top right.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I tried it a couple of times and couldn't notice any lag.  I say "a couple of times" because clicking on the female standing on the carpet just right of where the game starts gives the following error message:

Script 'Game_Interpreter' line 1411: SyntaxError occurred

unexpected ')', expecting $end

I suggest you check that event carefully.  Your script call has one opening bracket, but 2 closing brackets.  Removing the second bracket fixes the error message.

If I speak to the NPC at the bottom of the map just below and to the right of the enormous house with miles of pink carpet, the game freezes.

and if I meet one of those bugs in town (I thought towns were meant to be 'safe' places, so this came as a surprise) it has such high evasion that it is possible to get no hits in before it finally kills you!  Even if you do kill it, as these are random fights, and you have no money to heal up, two encounters will get you.  And, btw, his one skill shows up as a 'Special' (i.e. should use TP)  but it costs MP to use.  I would, therefore have expected it to be a Magic skill,

These sorts of issues made testing for lag a bit more difficult than it needed to be.  This isn't a project feedback thread, so I'll send you a pm with some of the other issues I noticed.  But lag is not particularly an issue.

I must admit I'm a bit confused by all this.  Your op says you removed the pathfinding script, but the game I've downloaded has it in.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
I only made a very short testplay, but I also hadn't any lag in that.


Either the lag is because of your computer's background programs, or we need a better description on where you experience lag, and how it effects you in your game if that doesn't happen on the starting map.
 

frederik850

Villager
Member
Joined
May 17, 2014
Messages
91
Reaction score
1
First Language
dutch
Primarily Uses
I implented the pathfinding script back in. And I created the syntax error on purpose to see if the lag would increase. And with the bug I increased the evasion by 75%. :) And I was just testing out some battle processing. Give me a minute and I upload a "cleaner version" of the project.

@ andar: With lag I mean that the screen is moving in "pieces" it isn't fluent like I experienced before the first syntax error.
 

frederik850

Villager
Member
Joined
May 17, 2014
Messages
91
Reaction score
1
First Language
dutch
Primarily Uses
After I deleted the project from my PC and downloaded it back from dropbox the lag seems to be gone. :) So for now that problem is solved. 

@Ksjip: The reason the game freezes when you talked to the NPC was because it was originally set as an auto event and it activated a certain moveroute, wich was probably blocked by you when you talked to him. 

And thanks for the help both of you! This looks like a great community.

EDIT: It seems that I was a bit enthousiastic. The lag returned the next playtest I did. Here is the 'cleaner version' of the project. 

https://www.dropbox.com/s/zjm0mmz1q21qm4z/Project2.rar
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I've tried the new version, and again I couldn't detect any lag, so maybe the problem is with your computer, or the background programs you have running.

I'll be sending you a second pm.
 

frederik850

Villager
Member
Joined
May 17, 2014
Messages
91
Reaction score
1
First Language
dutch
Primarily Uses
Well, then I think the problem has something to do with my graphic card, I had some problems before with that.

And I replied your PM.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Well, then I think the problem has something to do with my graphic card, I had some problems before with that.
I really doubt that this has something to do with your graphics card - graphic cards don't cause lag in 2D programs, not unless you also have thousands of randomly blinking pixels on your monitor (which would be the first indicator that your graphics card has memory failures and needs to be replaced)...
It might be that one of your programs choose that time to update itself while you're playing, or you could have too many programs working in the background (with or without your knowledge, if you got a spambot that could be one possible reason).


Or you have a program blocking your game - I remember one user reporting that his antivirus had placed RM on the "questionable" list and tried to block it until he cleared it in the antivirus.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top