AmieLK

Tired
Veteran
Joined
Feb 14, 2019
Messages
75
Reaction score
320
First Language
English
Primarily Uses
RMMV
EDIT: Using RPGMaker VX Ace.

I have been tearing my hair out trying to figure out what's causing lag. It spikes every couple seconds, and pretty much every thread I've found said to look for parallel processes. Here's the thing: there are none. I went through and removed all I could find. The only script I've added is the Vlue's Advanced Game Time. The map is the default size. I don't think I have any maps that have more than 50 events. I'm not sure if events in other maps effect the current map, but. I haven't actually implemented any battles or puzzles or anything--I've just been trying to perfect the main maps.

The start map scrolls text (which LAGS) then transfers the player to the actual first interactive map. Which has only one (1) event on it, which is a regular old transfer.

I've been reading as many threads as I can find, and I cannot for the life of me figure it out. It's driving me absolutely bonkers.

Help me.

(PS: I've seen things about an Effectus?? But none of the links to it work, and I can't find the damn thing.)
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,302
Reaction score
11,722
First Language
English
Primarily Uses
RMVXA
Effectus is no longer available as the scripter has left the scene. Sadly. But it is unlikely that it would help you in this case, as you do not, on the face of it, have anything that it could optimise. Can we see a screen shot of that scrolling event. Don't crop it - the info on the left is of crucial importance.

Please note that offers to pay anyone can only be made in the commercial section. As a new user you don't yet have access to it. Please edit your post to remove that part.
Thanks.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
Have you also tried to test it in another machine or get somebody else to test it and see if it also lags in their computer? It can also be your computer or something.

For example, in my laptop, if the battery is below 80% and its charging, any RPG maker game I play runs at only around 30-40 FPS, otherwise they run at 60.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,158
Reaction score
14,209
First Language
English
Primarily Uses
RMMV
You know there can be parallel processes in common events, right?

Do you HAVE the Effectus script? If not, don't worry about it.

Does the lag happen on the map you get transferred to as well?

Have you set up the Advanced Game Time script correctly, checked for switches/variables? Do you have any other scripts?
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,051
Reaction score
7,139
First Language
Indonesian
Primarily Uses
RMVXA
Lag can happen within three reasons:
1. Too many events. Parallel process, amount of events in the map.
2. Demanding scripts/Poorly written scripts.
3. Your CPU power.

How to diagnose:
For the first case
, you can try to make a sandbox project to create a stress test. Basically, you created a new project, away from any additional scripts. You create a bunch of events, whatever it is, you can even just create an NPC event that walks around using autonomous movement. On average, it may start to lag around 100 - 200 events by default, and that is without the parallel process running in the background. Just a lot of NPC events doing nothing but walking. The purpose of this test is to know the limit of your PC on how many you can handle the events.

For the second case, you basically just have to disable the script in your project. Keep the same amount of events running, see if the lag is gone. Identifying a script that causes lag can be more difficult as the reason for the lag can be various. But at least you have to confirm that it comes from that certain script.

For the third case, it's even more tricky. Someone has reported to me that their project was lagged around 30 to 40 FPS. I was willing to take a look at the project and I was confused that it runs at 60 FPS. Granted, I might still be able to optimize, but with the lack of feedback, if it's actually getting faster (since it runs in 60 FPS just fine), I couldn't help the person much.
 

AmieLK

Tired
Veteran
Joined
Feb 14, 2019
Messages
75
Reaction score
320
First Language
English
Primarily Uses
RMMV
Okay so I took out the Advanced Game Time script and it no longer lags. But I super need that function so I'm not sure if it's events referencing the script, or maybe I've set it up wrong?? I've gone ahead and grabbed some screenies of the events that reference the script too in cast that's helpful, plus everything you guys have requested.

upload_2019-2-14_9-49-51.png

upload_2019-2-14_9-50-16.png

Effectus is no longer available as the scripter has left the scene. Sadly. But it is unlikely that it would help you in this case, as you do not, on the face of it, have anything that it could optimise. Can we see a screen shot of that scrolling event. Don't crop it - the info on the left is of crucial importance.

Please note that offers to pay anyone can only be made in the commercial section. As a new user you don't yet have access to it. Please edit your post to remove that part.
Thanks.

Removed the paid offer! And also:

upload_2019-2-14_9-47-51.png
There you go!

Have you also tried to test it in another machine or get somebody else to test it and see if it also lags in their computer? It can also be your computer or something.

For example, in my laptop, if the battery is below 80% and its charging, any RPG maker game I play runs at only around 30-40 FPS, otherwise they run at 60.

It does lag on other computers, yes. First noted to me from some friends I've had testing it. Sadly. Have kept my computer at full charge and everything too just to check and make sure it's not the culprit. It's also a brand new Surface Pro though, so I doubt it's guilty. Should be smooth as anything.

You know there can be parallel processes in common events, right?

Do you HAVE the Effectus script? If not, don't worry about it.

Does the lag happen on the map you get transferred to as well?

Have you set up the Advanced Game Time script correctly, checked for switches/variables? Do you have any other scripts?

I don't have effectus, sadly. :(

I did check the common events, but those are all set to None since they're just checking boxes for coins, etc. The lag happens in every map as far as I can tell. But I think you're on to something with Advanced Game Time being set up incorrectly. I had it set up in Materials, under the [Insert here] function. All the events that referenced the script worked smoothly (including corresponding variables), other than the lag. But removing the script seems to remove the lag too. Gaahhh.

@TheoAllen I've got to dash out to the doctor's, but I'm going to go through your process step by step when I'm home. Thank you!
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
600
First Language
Italian
Primarily Uses
RMVXA
Okay so I took out the Advanced Game Time script and it no longer lags. But I super need that function so I'm not sure if it's events referencing the script, or maybe I've set it up wrong??

If you absolutely need an in-game time and that script is causing lag you can try mine and see if that one causes lag as well.

However try to check what Theo said and see if you can find out the origin of the issue. It might be some sort of combination between all of those things as well. If you get rid of one of them then it might even stop the lag caused by the script.
 

AmieLK

Tired
Veteran
Joined
Feb 14, 2019
Messages
75
Reaction score
320
First Language
English
Primarily Uses
RMMV
If you absolutely need an in-game time and that script is causing lag you can try mine and see if that one causes lag as well.

However try to check what Theo said and see if you can find out the origin of the issue. It might be some sort of combination between all of those things as well. If you get rid of one of them then it might even stop the lag caused by the script.

Will try it as soon I'm home! I don't actually need "time" so much as phases of the day and a day counter. As in there are ten in-game days before boss battle one, etc, and NPCs are in different locations depending on the time of the day. I see your script has the phases bit, but can I still count days passing? If so, then if it works I'm golden.

(Sorry for any typos or missing anything obvious--out and about and multitasking.)
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
600
First Language
Italian
Primarily Uses
RMVXA
It does indeed count phases of the day so if you need those you can give it a try. As far as I can remember it does not calculate the current day BUT that is something easily done.

Code:
class Game_Clock
  attr_reader :days

  alias hrk_initialize_no_day initialize
  def initialize
    hrk_initialize_no_day
    @days = 0
  end

  alias hrk_update_no_day update
  def update
    old_time = @time
    hrk_update_no_day
    @days += 1 if ((old_time != @time) && (time==0))
  end
end

You should be able to access the number of current in-game days using $game_clock.days if you add the above code to the script.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,158
Reaction score
14,209
First Language
English
Primarily Uses
RMMV
Can you provide a link to Vlue's script and show how you've got it set up (check the header part of the script just below the comments, to see if there should be any switches or variables to configure). I know a lot of people use that script and I haven't heard complaints of lag.
 

AmieLK

Tired
Veteran
Joined
Feb 14, 2019
Messages
75
Reaction score
320
First Language
English
Primarily Uses
RMMV
It does indeed count phases of the day so if you need those you can give it a try. As far as I can remember it does not calculate the current day BUT that is something easily done.

Code:
class Game_Clock
  attr_reader :days

  alias hrk_initialize_no_day initialize
  def initialize
    hrk_initialize_no_day
    @days = 0
  end

  alias hrk_update_no_day update
  def update
    old_time = @time
    hrk_update_no_day
    @days += 1 if ((old_time != @time) && (time==0))
  end
end

You should be able to access the number of current in-game days using $game_clock.days if you add the above code to the script.

Oh my god I might cry--you are my HERO. About to sit down and implement it. Here's hoping it works omg.

Can you provide a link to Vlue's script and show how you've got it set up (check the header part of the script just below the comments, to see if there should be any switches or variables to configure). I know a lot of people use that script and I haven't heard complaints of lag.

Here's the link I used (https://forums.rpgmakerweb.com/index.php?threads/advanced-game-time.3851/), and here's a screenie of where I've got it set up. (Forgive me if I'm missing the core of this question--I've been poking at RPGMaker for about 2 weeks now so there might be something basic I'm missing)

upload_2019-2-14_13-36-10.png

upload_2019-2-14_13-37-29.png
this is the default it comes with (excuse the messy addition of the toggle function--cat interrupted the first screenie). And these are the only adjustments I've made:

upload_2019-2-14_13-38-23.png

Haven't touched any other portion of the script. Am I missing something? I have a sneaking suspicion there's something really basic that I'm overlooking, but I haven't the faintest idea where to look for it.
 

Latest Threads

Latest Posts

Latest Profile Posts

unnamed_image.jpg
SOMEONE'S SINGLE! HE LIKES LONG WALKS IN THE IN THE SHADOWS AND THE SMELL OF DECAY. SADLY, HE HAS NO NUMBER BECAUSE HE HAS NO USE FOR A PHONE, BECUASE SUMMONING WORKS MUCH BETTER AND DOES NOT COME WITH AN ITEMISED BILL.
I just found out that MZ regional price on Steam in my place is much cheaper than MV.
Our water started to work again, now i don't have to fill up our toilet with water again.
Finally able to return to work after months of lockdown. My poor feet are hurting :( I need to get used to working again haha

Forum statistics

Threads
108,876
Messages
1,040,226
Members
141,312
Latest member
flortus
Top