New account registration is temporarily disabled.

LATENCY (ALSO KNOWN AS LAG)

Posts

Pages: 1
So, I have two computers. A desktop that's fairly new (well, not really, it still has XP, but fairly fast processor) but has a crummy fan, and a netbook that a little old but really not designed for heavier gaming. It shouldn't matter, but...

So I finish all my BetterAEP, custom stuff, and all and I run the dektop without a hitch. I run the netbook on the other hand, and after all the opening stuff I go to the world map, it just stalls for nearly a minute, before "teleporting" me across the screen.

Now, I could use the debug thing Cherry mentioned, but I have no idea what I'm looking for. I just know what I'm not looking for.

I had this problem before a new AEP, and before most if not all my plugins, so it doesn't seem to be that. I just pulled PartyEXP out of parallel and auto map processes, and besides which, I tested all the parallel and auto-events just by starting on the world map. No lag at all. It's one of the start up events (I have time and weather and such but they don't lag either, at least not until entering the world map). My best guess was that there was one of the called events I had during my teleport, but I tried that with just hide, teleport, show and it still lagged.

I have too many events, and have no idea where to look. Hold on, I'm gonna update so you've got the latest version.
Hey, I've experienced some problems with what appears to be slowdown when running a few RPGMaker XP or VX games (never a 2003/2000 game) on a few of my machines, none of which are newer than 2006. Some machines just can't seem to handle processing the basic engine at the original speed (40 fps for Xp and 60 fps for VX), especially on large maps. I think the engine on the 640x480 RPG Makers calls for a minimum of 1.4 Ghz, which most netbooks barely clear with their Atom processors.

By the way, what does AEP stand for?
Intel Atom CPUs are less powerful per GHz than any other modern x86 processor, besides.
I think it's the code (Oracle of Tao) not the computer. Especially since it runs just fine until I start turning plot events on.

But anyway, assuming it's not, and that I'm the oldest netbook user here or anywhere, mine's an Eee PC. Intel Atom 1.60GHz.

AEP stands for Better AEP. Which lets you do custom menus. (What AEP actually stands for, I have no clue)
AEP stands for "Auto Enter Patch".

Many years ago, the first "custom title" patch emerged, and it was named "Auto Enter Patch". It basically simulated pressing Enter while in the title screen and there was a very complicated way to load a game and exit the game (involving other patches and external tools). It had several drawbacks, like not being able to leave the "load game" menu other than actually loading a game or pressing F12, having the actual title screen shown for a second (you had to put a black titlescreen and systemset), etc.

Since this patch was commonly known as "AEP", I named my new patch "BetterAEP" because it's basically providing the same features as the original AEP, just "better".
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
Not much to go off of here!

Have you played many other RM2K3 games on the netbook? It might be something like a graphics card driver problem.

It also might be an audio issue, you should possibly update that driver too. Does the world map use a gigantic .wav sound effect? Does it use a music file that is corrupted or poorly made and has trouble loading?

If you copy and paste just this map to a new project, does it lag the same way? What if you copy and paste just this map plus the common events? If you leave the world map and then return to it, does it lag the same way again? What if you set the hero start position in some random town, skipping the opening events, and then walk out to the world map?
Okay, (btw it also lags when running through the debug addon Cherry mentioned) I'll try to answer as many of these as I can.

I think I nixed any .wav effects on the worldmap. There don't appear to be any sound problems either. Yes, I'm sure.

I'm fairly certain it's not the map itself. I plopped start hero directly onto the map and started, no lag. Which means, it isn't (just) the local events, event the auto/parallel locals. When I however run through all the starting events, and get onto the world map, it lags pretty hard.

So there's two modes of this the map itself (1) and the map with all events running (2):

1. When I leave and return there is still no lag. Ditto for walking out from town. When I add the geomancy event from a character joining in another town (I kinda figured this was the culprit, since it has to check for every step, it lags slightly but not nearly the extent of what I had actually running the story) I get a frame flicker after 10-20 steps (vs actually delaying movement when the story events are active). Btw, this is also with: a world map events, a forage system where crops/animals/fish randomly show up on the map, a system that turns on all overworld stuff (including changing the hero graphic to mini), and something that checks your current location.
2. I could walk straight outside and literally would not be able to take a step on the older computer (or debug mode). If I exit the world map, the problem usually resolves, but comes back whenever I enter the world map (I haven't tried it on my second part world map, mainly because it's hard to get to this point in the plot without doing some sort of debug cheat). The events of the early start up are all switch based- Level Up (shows a custom level menu if one variable, the new level is greater than the old, and resets the numbers), Time (a time system including day night, I went a bit crazy with it, running time all the way up to the end of a year), Key Press (checks for various buttons), Consumable (special outside battle items), Death (makes sure my lead gets revived and everyone else doesn't), BattleEvents (wait, I can get rid of that I have it in battle. But it lagged before that), Encounter (allows for 1/2, 2x, and none encounter event items, though it's mainly for the world map). Then I set the variable to the games start hour. I also have weather and seasons. After the plot is finished, I add a game help system, and turn on the plot events. All of these load just fine on a 100x100 screen with more than a few local events, but when I exit to the world map screen suddenly the same screen with no lag above freezes.

I'm gonna make a trace.log (1 is start from basically no events, 2 has all the extra stuff running).

http://rpgmaker.net/media/content/users/3388/locker/tracelogs.zip




So we can rule out DynRPG plugins, move all of your plugins out of the DynPlugin folder and see if it still lags (I'm thinking it will).

Next is probably what you don't want to hear because I've been tooting this horn a few times in the DynRPG thread (brought up here), but you should NOT use parallel process events in any of your custom menus. In fact, you should remove as many parallel process events as possible, because as they imply, you're adding a new process each time you use one.

What you need to use instead are Auto-start events, utilizing labels, "go to label," and "call events." Second, and this is probably what's killing performance, you'll need to initialize ALL of your pictures first (even ones that aren't being used) using "show picture," and then use "move picture" to show them, and move them around etc. Fact: Show Picture causes lag no matter how big or small the picture is, because if you have a parallel process that's running through instructions and hitting "Show Picture" numerous times per second, in actuality it's drawing the picture on-screen every time it hits that instruction, so understandably that's going to cause lag.

Keep parallel process events to an absolute minimum and use it for simple stuff like storing a few variables to track your X, Y & Map ID, or to update existing pictures on-screen (again, they must be intialized first). Using them for your menu controls is just sloppy programming (sorry!)

I know, because I was doing that for a while too. :)
author=bulmabriefs144
Okay, (btw it also lags when running through the debug addon Cherry mentioned)

The debug addon is slowing down the game a lot during tracing because it has to write all the data to the log :)

In log 2: 2151 event commands have been processed during 3 frames. 3 frames are supposed to be 0.05 seconds. Here, it took 13 seconds, but that's mostly due to tracing, I think.
Most of the event commands come from an event with lots of stuff like "<> Fork Condition: If Hero #4 has learned skill #446 then ...", "<> Change Skill: Hero #4, Learn skill #640", "<> Fork Condition: If Hero #1 has item #392 equipped then ..." - the debug addon didn't find out the event ID for this one, but this event has over 1500 lines - and common events 119, 191, 303, 66

@PepsiOtaku: Drawing the picture on screen is not the problem, the problem is loading the picture from disk (and decoding the PNG data). Unlike charsets, chipsets and facesets, pictures are not cached in memory.
It was before plugins. I've had this problem since... well, gosh if I could remember when, I wouldn't be having this problem.

Okay, restarted it with no plugins anyway. Went through all the starting stuff and no lag... well, it does have some lag on this computer but it's 1/3 the lag I felt with DynPlugins. ...I think I'll check KazString and a few other ones.

I have a parallel processes and auto-events Pepsi. Parallel when it's actually running a process that's in the background (day/night is a good example). I have auto-events for things that involve stuff where I run it once and done.

Yea, I know about the pictures (I found out about it trying to make a lantern effect). This is part of why my menus are parallax rather than picture, picture handling is something you've gotta make sure to do correctly.

I think I'll need to check my plugins for any that might be running constantly. And see what I can do about turning that 1500 line stuff off or something.

--------------------------------------

Yea, Cherry, that's a bit of a mess if that's the problem. I wanted to have items with custom effects, that targeted characters (switch ON targets everyone). For instance, one of the items gives a random stat a random bonus to a specific character. The only things I could come up with for targetting with a custom effect was to either do it by status, or by temporarily learning a skill, then unlearning it.

For my first character, it's something like:


If Character1 is MysterySeed skill had
Random num 1-6
If Random Random num is 1
(add random ability)
If Random Random num is 2
(etc...)
Remove Skill MysterySeed

Ummm, so it runs through 1500 lines of this. That does seem like the culprit (one of them anyway). I'm not really sure how I could do these so they wouldn't run quite as fast. Would making some of these call events really help or is there a better way of it?

Call events did seem to cut some of the lag. Latency went down from complete freeze to jumpiness after a few steps. I think I'll try that for a few events, and see what's up with the plugins.
Don't forget to check common events 119, 191, 303, 66, they are also using a lot of processing time.
119 is Puffer. It's another of those skill/condition items. Basically, it's an item that either cures a bunch of status, or kills you.



191 is Pizza. To make matters worse, it runs three different conditions (S,M,L pizza) and runs pictures (which you said were a prime source of lag) of pizza on the call event. Gah... this might maybe be one of the big winners? Maybe I'll turn this into a battle event, as those seem to run faster.



303 is geomancy. Another big winner. It run in the background, and again every step you take. I might outright remove this one, as it's kinda... excessive?



(I wanted it for regional weather, but I also had it hooked into a geomancy spell. I think I've switch it to a subset of key events, so it runs just if I move rather than constantly. I can't guarantee it won't still lag though)

66, huh? I knew it. Enable Map, basically what I use to switch over to world map. I have two options with this one. It's not that big, but I have it in the wrong place.



The problem is the position, because I have it in a parallel process local event (if it needs to run, it should always run, but I think I can put it in my auto/erase local event and just have it run once per world map screen entered).

Update: Couldn't do much with puffer. Pizza, I turned the picture into an animation, and I switched condition to skill (I'm not actually sure which of these is faster, skill or condition, but it uses a bit less resources to make a skill that involves learning a skill than it does to have three unnecessary conditions). Weather regions, I stripped from geomancy (I think I'll make some event where you learn geomancy in battle rather than relearning/unlearning from terrain. That idea was a bit too costly considering the average person used it maybe once or twice). The last one is probably an easy fix, I just moved it.



If it's okay that the events are not processed completely every frame, but may take multiple frames to run, then you could put several Wait 0.0 commands in the middle of the long events.
Okay. I'm gonna test this on my slower computer, and then probably try that if things still lag.
Pages: 1