[2K3] REDUCING LAG IN-GAME
Posts
Pages:
1
Alright, it's that time of the year again where we all sing about campfire songs and...oh wait, this isn't what this is about? Oh...
Anyways, on a more serious note, I've been having some tremendous lag in some areas of my game (notably, the areas where I actually used events for mapping). In some OTHER areas not those (where it's normally mapped), I get a slight lag after battles. In the 2 areas where I used events? It lags...really...really...badly. At first I checked each parallel process I had, and reduced it down to the HP/MP +% stuff. However, now that I look at this list I compiled...
0003: Timer
0006: Change Cirno
0007: Encounter Stuff
0008: Blue Mage
1363: Money Ring
1364: HP +10%
1365: HP +20%
1366: HP +30%
1367: HP +40%
1368: HP +50%
1369: MP +10%
1370: MP +20%
1371: MP +30%
1372: MP +40%
1373: MP +50%
1374: HP/MP +20%
1375: HP/MP +40%
1376: HP/MP +60%
1379: Weapon Bonuses
1385: MP Stroll
1394: Bubble
1447: Steps Taken Check
1457: Recover
1465: Equipment Abilities
1469: EX Keine
1472: Yuuka Passive
1677: Nitori Skills
That list is a list of all of the Parallel Processes I have in the game that do NOT run via a switch (other Parallel Processes/Auto-Start events shouldn't matter here at all since they're only ran when a switch is active). So my question is, how can I go about making the lag less but still have the ability to keep all of these common events? I don't really want to get rid of anything that badly, as these are all (mostly) important to characters (granted, the HP/MP +% stuff is only on accessories, but that'd mean I'd have accessories that do nothing...). Any suggestions for the weary traveler?
EDIT - To make things clearer, this is what each does:
0003: Timer (Used for anything that involves the timer. Doesn't go well with the Game Clock plugin possibly? I'm not sure, but it's used for anything regarding that).
0006: Change Cirno (Used for switching between Cirno and Advent Cirno depending on if she has the Advent Ring equipped or not in either form)
0007: Encounter Stuff (All of my coding for things like Half Encounter Rate/No Encounters/Double Encounter Rate, and whatnot)
0008: Blue Mage (This...doesn't seem to serve a purpose anymore? Not that I can find anyways, but it's like...one conditional branch with hardly any coding)
1363: Money Ring (Tracks the location of your character (if they move one pixel, you gain 1 Yen) as long as the character(s) (only 2) in question has the Money Ring on)
1364-1376: Adjusts the characters Max HP/MP values accordingly. Kinda big too
1379: Weapon Bonuses (Does things such as give stat bonuses/penalties, add/remove skills, and other such nonsense)
1385: MP Stroll (Much like the Money Ring, uses variables and X/Y coordinates to track the player's movement, and after X steps will restore MP)
1394: Bubble (Whenever the Bubble status is applied outside of battle, will run this event)
1447: Steps Taken Check (Same as Money Ring/MP Stroll, used for a skill)
1457: Recover (Only occurs if the character herself is in the party. After battles, will restores X% HP/MP to the party. Kinda big)
1465: Equipment Abilities (Much like Weapon Bonuses, for for other equipment)
1469: EX Keine (Used to keep EXP and Levels even between Keine and her EX form, used only in battle)
1472: Yuuka Passive (Both for Yuuka and Remilia, for them getting their battle bonuses)
1677: Nitori Skills (Giant common event for Nitori switching her skills around so that the player can utilize the effects of Chemist, Mirror Items, or both).
Anyways, on a more serious note, I've been having some tremendous lag in some areas of my game (notably, the areas where I actually used events for mapping). In some OTHER areas not those (where it's normally mapped), I get a slight lag after battles. In the 2 areas where I used events? It lags...really...really...badly. At first I checked each parallel process I had, and reduced it down to the HP/MP +% stuff. However, now that I look at this list I compiled...
0003: Timer
0006: Change Cirno
0007: Encounter Stuff
0008: Blue Mage
1363: Money Ring
1364: HP +10%
1365: HP +20%
1366: HP +30%
1367: HP +40%
1368: HP +50%
1369: MP +10%
1370: MP +20%
1371: MP +30%
1372: MP +40%
1373: MP +50%
1374: HP/MP +20%
1375: HP/MP +40%
1376: HP/MP +60%
1379: Weapon Bonuses
1385: MP Stroll
1394: Bubble
1447: Steps Taken Check
1457: Recover
1465: Equipment Abilities
1469: EX Keine
1472: Yuuka Passive
1677: Nitori Skills
That list is a list of all of the Parallel Processes I have in the game that do NOT run via a switch (other Parallel Processes/Auto-Start events shouldn't matter here at all since they're only ran when a switch is active). So my question is, how can I go about making the lag less but still have the ability to keep all of these common events? I don't really want to get rid of anything that badly, as these are all (mostly) important to characters (granted, the HP/MP +% stuff is only on accessories, but that'd mean I'd have accessories that do nothing...). Any suggestions for the weary traveler?
EDIT - To make things clearer, this is what each does:
0003: Timer (Used for anything that involves the timer. Doesn't go well with the Game Clock plugin possibly? I'm not sure, but it's used for anything regarding that).
0006: Change Cirno (Used for switching between Cirno and Advent Cirno depending on if she has the Advent Ring equipped or not in either form)
0007: Encounter Stuff (All of my coding for things like Half Encounter Rate/No Encounters/Double Encounter Rate, and whatnot)
0008: Blue Mage (This...doesn't seem to serve a purpose anymore? Not that I can find anyways, but it's like...one conditional branch with hardly any coding)
1363: Money Ring (Tracks the location of your character (if they move one pixel, you gain 1 Yen) as long as the character(s) (only 2) in question has the Money Ring on)
1364-1376: Adjusts the characters Max HP/MP values accordingly. Kinda big too
1379: Weapon Bonuses (Does things such as give stat bonuses/penalties, add/remove skills, and other such nonsense)
1385: MP Stroll (Much like the Money Ring, uses variables and X/Y coordinates to track the player's movement, and after X steps will restore MP)
1394: Bubble (Whenever the Bubble status is applied outside of battle, will run this event)
1447: Steps Taken Check (Same as Money Ring/MP Stroll, used for a skill)
1457: Recover (Only occurs if the character herself is in the party. After battles, will restores X% HP/MP to the party. Kinda big)
1465: Equipment Abilities (Much like Weapon Bonuses, for for other equipment)
1469: EX Keine (Used to keep EXP and Levels even between Keine and her EX form, used only in battle)
1472: Yuuka Passive (Both for Yuuka and Remilia, for them getting their battle bonuses)
1677: Nitori Skills (Giant common event for Nitori switching her skills around so that the player can utilize the effects of Chemist, Mirror Items, or both).
For equipment related stuff, why not run them once when equipment is changed? Run 'em when the menu is closed or when some event can cause a change in equipment or just run it before a battle. There's no need to have them constantly working when 99% of the time the state of character's equipment hasn't changed.
Basically don't do parallel process when you only need to call an event at certain times. Combine those "when player moves do X" into one too. Make a move listener event and when the player moves then call the common events that do Money Ring and MP Regen stuff.
Basically don't do parallel process when you only need to call an event at certain times. Combine those "when player moves do X" into one too. Make a move listener event and when the player moves then call the common events that do Money Ring and MP Regen stuff.
Because I'm not sure on HOW to run them only once (also, can't really run it before a battle since well...how do you run an event before a random encounter?), outside of having them be parallel processes ^^;. The "When play moves do X" things though...I can see them being in one event aye.
Aha~ I have solved it I believe. All I did was make a Parallel Process common event, had that event call the OTHER events that are listed above, and then made all of THOSE events Call events. Seems to work fine, if only a little delay here and there on events activating buuuuut~
Glad you figured it out.
Just as a note: to run an event before battle begins you can just setup an event page in the beginning of each battle (on turn 0) and run a common event. This would make it so the event runs only once, and it's "technically" before the battle begins.
Just as a note: to run an event before battle begins you can just setup an event page in the beginning of each battle (on turn 0) and run a common event. This would make it so the event runs only once, and it's "technically" before the battle begins.
Oh, so what I've done for some things in a way, such as setting timers at the start of battle and variables and whatnot? I should've guessed that but...well...guess I don't figure things out as quickly as I thought. ^^;
Yeah, you want to reduce parallel processes as much as possible. Only having things that really should be updated constantly (perhaps a custom movement type thing) or something of that caliber. However, things related to the menu and equipment/skills have a predictable usage.
Yeah, basically what I did for my game is just have a giant CE called "battle start" (or something) and run that on turn 0 of each battle. That CE can even turn on a switch, which can be linked to a parallel process that will run after the battle finishes. Then when the battle is over and the event runs once you turn it off (like a "battle end" event). This will allow you accomplish two things at once!
Yeah, basically what I did for my game is just have a giant CE called "battle start" (or something) and run that on turn 0 of each battle. That CE can even turn on a switch, which can be linked to a parallel process that will run after the battle finishes. Then when the battle is over and the event runs once you turn it off (like a "battle end" event). This will allow you accomplish two things at once!
author=MakoInfused
Glad you figured it out.
Just as a note: to run an event before battle begins you can just setup an event page in the beginning of each battle (on turn 0) and run a common event. This would make it so the event runs only once, and it's "technically" before the battle begins.
Yes, turn battle 0 and turn battle 1x are your friend. They keep you from having ten zillion pages, by putting all start of battle, and all every turn event in its place.
Parallel processes aren't totally evil. Knowing how to use them is the issue.
Also, learn to use Erase Event. You can have a auto/parallel (it doesn't matter since it's gonna be erased, but I prefer being able to move to being stalled until it finishes) local event that runs stuff that doesn't need to constant update. Call all the single worldmap events in this, and then Erase Event. The thing will run each time you re-enter the screen, instead of every 0.1 seconds or whatever.
Also, didn't I start this thread?
Pages:
1
















