Jump to content

What events can cause lags in game?


Recommended Posts

It entirely depends on the speed of the server and players computer. If you have a great server then you should only experience lag with large quantities of entities. If you have a slow computer it could be a larger number of reasons, computing speed playing a huge factor.

If you have a great server then you should only experience lag with large quantities of entities.

 

 

I have great server with low CPU usage. But sometimes my server has lags like teleporting player back to monster or to previous point.    :( Even I have this kind of lags (with ping 0 and good computer).

I'd like to know most of main hook points where I can inject to check lags. Now I'm checking load on FindEntities and all places with ProfilerPush.

But sometimes my server has lags like teleporting player back to monster or to previous point.

 

What do you teleport? Just players or players with followers?

 

In Arcade's Saber Lion mod, you can have as much little cub followers as you want. In a previous version, if you got like 20 cubs and teleported via c_gonext, if you were a client with permissions or just admin teleported, there was an inmense lag and the client would display an "out of memory" error.

 

That was before I optimized their brains and changed some functions.

Then there was some mild lag when teleporting, but no errors.

 

I tried replicating the issue by getting 30 pigs to follow me, then teleporting across the map.

I got lag, but no errors.

 

I noticed there was no issue when using wormholes, however. Perhaps if you don't teleport in a certain way there is a leakage somewhere?

@Maris, I simplified the code in a clean way. Originally it was a mess with code all over the place, like the pig brain but with everything scattered everywhere, with recursive nodes and pointless arithmetic. And all this with 0.1 time ticks. So I upped the value to 1 second and removed a lot of pointless code. If you are writing brains or tasks, keep it clean and remove unnneccesary checks.

 

Brains, entities and updating components are taxing when you just toss them all into the frame at once. My guess is that brains are somehow heavy on bandwidth, since in general, as a host, I can have 40 pig followers at once, no lag, but when I'm a client somewhere and do the same, the time stopping starts.

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...