ID:165579
 
Is it posible to make a verb to show how much latency is in the game or in other words a verb to show how much the world is lagging.
Miran94 wrote:
Is it posible to make a verb to show how much latency is in the game or in other words a verb to show how much the world is lagging.

Not really. The most common form of lag is network latency (ie: 100ms ping or less good, 300ms ping or above bad). There's no way to use code to measure the latency between the server and a player.

You can use the world.cpu variable to see how hard the server's processor is working. Some games run lots of computationally intensive code, or lots of inefficiently programmed code, which will cause the cpu to work harder. If world.cpu starts to get close to 100, the game is going to start to lag. However most games don't need to worry about that at all: network lag is almost always the main culprit.