My PVP game works so that when 1 team wins, the round ends and everything is restored to default by world reboot. I want to be able to do that without using reboot so that resources dont need to be read again, and I found a way of doing this by having a proc check in all the objects and mobs that checks for a round end every 10 seconds. What I'm curious about is whether that itself will cause lag, due to all character selection icons and the world doing a proc check using spawn() and goto. would all those checks melded together cause lag and if so how much contribution?
|
Answer to C:
I would just do it when the event occurs. Problem is how would I call things such as turfs when using a world proc? |
B) There are two types of lag: that caused by network latency, and that caused by intensive server CPU usage. The latter occurs when your game is trying to do so much in a short time frame, that it can't get everything done and the game "lurches" for clients. Depending on how many objects you have running their own loop and the power of the machine hosting the game, you may or may not experience "lag"
C) Don't "poll" for values in a loop to see if you should do something, instead just do it when the event occurs
D) Typically the most robust method for reloading the world is to just unload and reload the map, by using something like Map Instancing or SwapMaps.