WHAT CAUSES MORE LAG?
Posts
Pages:
1
I have alot of anti-lag methods (Switches / variables / conditional branches / wait 1 frame(s) to stop from constantly updating).
But I have a question:
I know events cause lag, and the more events the more the lag ... but my question is what causes more lag? An event that has 20+ pages? Or an event that has a page with thousands of lines of code? (Conditional branching and switching / looping / labeling).
Because I have an event that has over 20 pages that could probably all be put into one page ... but it looks alot cleaner with many pages.
I don't experience any lag, as I have a super computer, but for others that may want to play my game ... I don't want them to experience any lag.
So yeah pages or no?
But I have a question:
I know events cause lag, and the more events the more the lag ... but my question is what causes more lag? An event that has 20+ pages? Or an event that has a page with thousands of lines of code? (Conditional branching and switching / looping / labeling).
Because I have an event that has over 20 pages that could probably all be put into one page ... but it looks alot cleaner with many pages.
I don't experience any lag, as I have a super computer, but for others that may want to play my game ... I don't want them to experience any lag.
So yeah pages or no?
author=AznChipmunk link=topic=2329.msg40352#msg40352 date=1225159456
Pages don't have anything to do with lag.
You sher?
GZ on your 500th poast!
Multiple events running at once is the most likely culprit. Does your map have a ton of monsters/npcs/parallel processes? Those make your game lag, more often then not.
If you have a bunch of map events, try breaking your map into two or three smaller ones.
And, sorry to disappoint, but Azn is NOT Cher.
If you have a bunch of map events, try breaking your map into two or three smaller ones.
And, sorry to disappoint, but Azn is NOT Cher.
author=ChaosProductions link=topic=2329.msg40365#msg40365 date=1225160317
Multiple events running at once is the most likely culprit. Does your map have a ton of monsters/npcs/parallel processes? Those make your game lag, more often then not.
If you have a bunch of map events, try breaking your map into two or three smaller ones.
And, sorry to disappoint, but Azn is NOT Cher.
Well its for a battle system so I can't really split the map, it's all suppose to happen on one map.
And almost everyone of my events are parallel processes. I don't experience any lag, but I'm sure anyone who has below 1gb of RAM will lag when using the ABS.
And who is Cher
I was saying you sher? as in you sure lol
author=VerifyedRasta link=topic=2329.msg40368#msg40368 date=1225160876
Well its for a battle system so I can't really split the map, it's all suppose to happen on one map.
And almost everyone of my events are parallel processes. I don't experience any lag, but I'm sure anyone who has below 1gb of RAM will lag when using the ABS.
He means split up the event. Also, I've coded ABS (simple to complex for RM) that didn't lag for me. And I had lower than 1 GB RAM. I have exactly 1 GB RAM now though.
author=ChaosProductions link=topic=2329.msg40365#msg40365 date=1225160317
And, sorry to disappoint, but Azn is NOT Cher.
hehehe
author=Max McGee link=topic=2329.msg40387#msg40387 date=1225162733
rm2k(3) doesn't really have lag.
RM(V)X(P) is a different story!
It doesn't, but if you put 100+ events on any map, in any maker it will lag.
author=Max McGee link=topic=2329.msg40387#msg40387 date=1225162733
rm2k(3) doesn't really have lag.
Yes it does.
I feel that RMVX just runs smoother then the other makers because When I run it on my shitty 256mb computer it actually runs quite smooth, but when playing RM2k3 games on it it lags like crazy. (Excluding RMXP as I have never ran it on my old comp)
Yeah my home computer isn't that great so i do experience a lot of lag. Such things as weather effects, too many events on a map etc contribute to lag.
All sorts of custom events can be constructed entirely without lag. What you need to do is discover the wonders of scripting in what I call the "Cycle-Priority-System".
Realize that all commands you execute in a script in RM2k/3 happen nearly instantaneously. Group your events by purpose, and then compile them into Call Event Map Event pages or Common Events. Then, put a Wait 0.0 or two in there to process player inputs, and set up a priority of execution.
A game is a series of input-output functions and independently running scripts to provide a context for those functions. What you need to do is be able to articulate these in a sequence that can repaeat itself over and over. I have found that the best way to do this is like such.
Start Loop
Wait (This is where all the action and fuctions have a chance to display thier visual representations on the screen, in terms of animations or changing graphics. This is also where the player has an oppourtunity to input commands.)
Check Input (Because we had a wait period in the last event, an empty period where the player could press the button, here we check what input if any was given.)
Execute Input (Here we change the game functions that directly correspond to player input. IE Add to Character X and Y variables, so that the player will move around, or if the player has his ESC we want to call the script that brings up the menu. This can be used to call other events that have the script for specific functions set inside of them. Say, if after the player hits a button, it does a magic spell. You could call one events that is the script for the magic spell, and then another that is the script for variable splitting, and then another that is the one that changes the display for the MP, or better yet, include those subn-scripts in the script for the magic spell, if you know what I mean. Because this is all jsut math being done and not the animation of the )
Execute Scripts (Can be integrated with Execute Input) (Here we change game functions that are independently running or indirecly affected by player input. IE Execute monster AI in to follow the player, world effects, varai)
Animate (Can be integrated with previous two steps) (Here, we change what ever graphical representations of the values held in the executable steps to show what has happened. IE We changed the variables of player X&Y in the Execute Input phase, but now we have to run the command to change the position of the hero on the screen or on the map in accordance with those changes. If the player has accessed the menu, we want to bring up the menu graphics to show that the player input has indeed succeeded in bringing up the menu. Animation events can last several cycles, and as such can be executed in Parallel Processes that have a specified length, or another way of doing that is to have them be clocked through a "cycle count" variable.)
End Loop
Scripting events like this is a surefire way to decrease lag in the events themselves, and the only thing that would then bring lag is if you choose to script animations in a non-parallel process, but even that can be done differently, with the cycle-count, as I mentioned.
Realize that all commands you execute in a script in RM2k/3 happen nearly instantaneously. Group your events by purpose, and then compile them into Call Event Map Event pages or Common Events. Then, put a Wait 0.0 or two in there to process player inputs, and set up a priority of execution.
A game is a series of input-output functions and independently running scripts to provide a context for those functions. What you need to do is be able to articulate these in a sequence that can repaeat itself over and over. I have found that the best way to do this is like such.
Start Loop
Wait (This is where all the action and fuctions have a chance to display thier visual representations on the screen, in terms of animations or changing graphics. This is also where the player has an oppourtunity to input commands.)
Check Input (Because we had a wait period in the last event, an empty period where the player could press the button, here we check what input if any was given.)
Execute Input (Here we change the game functions that directly correspond to player input. IE Add to Character X and Y variables, so that the player will move around, or if the player has his ESC we want to call the script that brings up the menu. This can be used to call other events that have the script for specific functions set inside of them. Say, if after the player hits a button, it does a magic spell. You could call one events that is the script for the magic spell, and then another that is the script for variable splitting, and then another that is the one that changes the display for the MP, or better yet, include those subn-scripts in the script for the magic spell, if you know what I mean. Because this is all jsut math being done and not the animation of the )
Execute Scripts (Can be integrated with Execute Input) (Here we change game functions that are independently running or indirecly affected by player input. IE Execute monster AI in to follow the player, world effects, varai)
Animate (Can be integrated with previous two steps) (Here, we change what ever graphical representations of the values held in the executable steps to show what has happened. IE We changed the variables of player X&Y in the Execute Input phase, but now we have to run the command to change the position of the hero on the screen or on the map in accordance with those changes. If the player has accessed the menu, we want to bring up the menu graphics to show that the player input has indeed succeeded in bringing up the menu. Animation events can last several cycles, and as such can be executed in Parallel Processes that have a specified length, or another way of doing that is to have them be clocked through a "cycle count" variable.)
End Loop
Scripting events like this is a surefire way to decrease lag in the events themselves, and the only thing that would then bring lag is if you choose to script animations in a non-parallel process, but even that can be done differently, with the cycle-count, as I mentioned.
Pages:
1





















