Jump to content

Rubberbanding and such


Recommended Posts

I been trying to play this game with a friend by us both hosting how ever the more days we do we getting more and more rubberbanding or lost of connection 

I read many posts but its all mainly server base is they any way we can just host our selfs with out these problems.

Not only this picking up items moving items around on hot bar too its just so so bad  

It seems the more days we do the worest it getting and we on day 58 and its so so bad.

 

I so want to stream this on twitch but right now its holding me back 

 

 

Link to comment
https://forums.kleientertainment.com/forums/topic/88811-rubberbanding-and-such/
Share on other sites

Get rid of mods. Make sure you don't have display food values mod because: 

 

Turn lag compensation off.

Turn caves off.

If this doesn't fix it then simply you and your friend are too far apart for a good connection. This game isn't great at handling lag.

16 hours ago, Bluckles said:

Turn lag compensation off.

Turn caves off.

If this doesn't fix it then simply you and your friend are too far apart for a good connection. This game isn't great at handling lag.

To be fair, caves should cause zero lag, as long as nobody's in them and the overworld at the same time. Most operating systems can quietly shelve idle processes with little to no resource usage, especially processes idling waiting for a connection like the game server. At least, I'm pretty sure the sim pauses when there's no players in it. I don't know if Don't Starve somehow messes that up, and eats CPU in the caves process while everyone's above ground.

Lag compensation is sadly kind of important, because it's a whole different strategy, that could actually save bandwidth. In this strategy, a game's client will try to find the correct position, sending that to the game's server. Sadly, when a server is heavily lagging, it can miss position updates, so think that you just jumped from one point to the next. "Foul cheater!" the server howls, "Your position cannot have changed that much!" and so it keeps sending you position updates to pull you back to the same spot, until you can move slowly enough that it finally sees you're not teleporting.

The solution to this of course is to accept all position updates, even apparent teleports, but record them for a responsible human admin to see if someone's teleporting all over their map even during times of low lag. The server can also increase the "acceptable distance" depending on how long since the last position update it received, which would allow for people teleporting who stood still for the time it took them to walk, but again you can't substitute automatic anti-cheat algorithms for a good admin, without hurting the legit players, especially in times of lag.

Another solution is to have the clients participate in the game more, determining the location and status of mobs, so a client can precisely say how much someone got hit. This obviously takes a burden away from the server, and obviously could enable some shenanigans wherein someone's client reports that they just defeated 100 terrorbeaks in 0.1s. But if someone's not gonna play nice, either you have the server babysit everyone and risk lag, or you just ban the abusive people, and let everyone else fight with no possibility of lag. I'm a big advocate of hands-off servers like that, which at most will warn admins if a player seems to be doing something wrong.

Klei's game doesn't do any of that though, and just assumes that forcing the player to stand still is a good idea. So... yeah. If you're rubberbanding endlessly, try moving in tiny increments slowly. That might work, or you could just go find a non-laggy server. Or you could disable lag compensation.

Disabling lag compensation is "terrible" since the client stops trying at all, and just sends repeated position updates to the server, waiting until the server returns a "okay you are now here" before moving to that point, or completing that action. That puts more of a burden on the server, could technically eat up a lot of bandwidth, and... is the only way to be totally sure of your position as far as the server knows.

Honestly, turning off lag compensation doesn't really fix the issue. You're gonna lag either way. All it does is show you your real position on the server. So it might stop the rubberbanding and getting hit from enemies significantly far away from you, but that lag is still there. You just trade rubberbanding for input delay. So this doesn't really fix the problem.

4 hours ago, kertinker said:

To be fair, caves should cause zero lag, as long as nobody's in them and the overworld at the same time. Most operating systems can quietly shelve idle processes with little to no resource usage, especially processes idling waiting for a connection like the game server. At least, I'm pretty sure the sim pauses when there's no players in it. I don't know if Don't Starve somehow messes that up, and eats CPU in the caves process while everyone's above ground.

2

Nope. The game is running two servers no matter what and this can cause a lot of lag, especially to less powerful computers.

And on lag compensation, it depends on the severity. If lag is extremely severe then stop playing. If lag is medium, turn it off because it can help you realize where you actually are and inputs should only be slightly delayed. If lag is minimal, turn it off/on to your preference because it doesn't make a difference.

 

6 hours ago, Bluckles said:

Nope. The game is running two servers no matter what and this can cause a lot of lag, especially to less powerful computers.

The game only even starts up areas that are nearby. That's why fires go out if you leave the area. Why would it keep running stuff underground, if nobody was down there?

Okay, I just tested it out, and the CPU usage went from 7% to 9% in both shards even when I was only in one. When I entered the world, CPU usage went up to 15% but only for the shard I was in. I set loose 140 butterflies in the caves, and CPU usage shot up to 30%... for the caves. The overworld server remained at 9 or 10 percent. Went up the stairs, and the CPU for the caves went down to 9% despite still having a ton of butterflies down there, while the CPU for the overworld went back up to 15-17%. Released about 300 birds up top, and in the bird tornado, CPU usage went back up to 30-something, but only for the overworld. Went back down, and released 500 poisoned canaries in the caves.

Then, I set the feathers on fire.

My Caves shard was at 110%, but my overworld shard was still only at 9 or 10! :D

Left the caves after a few tries, and bam, the caves shard went back down to 9%.

So no, I'm happy to say the game is not running two servers no matter what. Both servers have to do something when a player connects, but only a very small, constant amount, that does not depend on how many butterflies are loose in that shard. The shard the player is in will take the most CPU, changing as the player's world becomes more, or less active.

I haven't tested more than one player, if each player adds 2% CPU to the non-active world. I doubt it though, because that would be really sloppy coding on Klei's part.

17 hours ago, kertinker said:

The game only even starts up areas that are nearby. That's why fires go out if you leave the area. Why would it keep running stuff underground, if nobody was down there?

Okay, I just tested it out, and the CPU usage went from 7% to 9% in both shards even when I was only in one. When I entered the world, CPU usage went up to 15% but only for the shard I was in. I set loose 140 butterflies in the caves, and CPU usage shot up to 30%... for the caves. The overworld server remained at 9 or 10 percent. Went up the stairs, and the CPU for the caves went down to 9% despite still having a ton of butterflies down there, while the CPU for the overworld went back up to 15-17%. Released about 300 birds up top, and in the bird tornado, CPU usage went back up to 30-something, but only for the overworld. Went back down, and released 500 poisoned canaries in the caves.

Then, I set the feathers on fire.

My Caves shard was at 110%, but my overworld shard was still only at 9 or 10! :D

Left the caves after a few tries, and bam, the caves shard went back down to 9%.

So no, I'm happy to say the game is not running two servers no matter what. Both servers have to do something when a player connects, but only a very small, constant amount, that does not depend on how many butterflies are loose in that shard. The shard the player is in will take the most CPU, changing as the player's world becomes more, or less active.

I haven't tested more than one player, if each player adds 2% CPU to the non-active world. I doubt it though, because that would be really sloppy coding on Klei's part.

Well here's how it works:

When you host a server with no caves, then the game only runs one process. When you host a server with caves, then the game runs three processes, for the forest, caves, and the client.

Even unloaded, entities run an update function. Like trees growing. Caves no matter what will cause more stress

On 3/20/2018 at 10:08 PM, Bluckles said:

When you host a server with no caves, then the game only runs one process. When you host a server with caves, then the game runs three processes, for the forest, caves, and the client.

Even unloaded, entities run an update function. Like trees growing. Caves no matter what will cause more stress

With a dedicated server, you're gonna have an extra process for the client regardless. Anyway like I said, I measured the CPU load each process took, and it was 7%, no matter how many entities were in the shard. If "unloaded" entities run an "update" function, that's how much CPU it eats, and it doesn't go up as the number of entities increases. I imagine if two players are both in different places on the same shard, that'd cause (with the exception of 7%) the same load as if one were aboveground and one were below. Caves will cause more stress if people are in both shards, but what really causes stress are a lot of loaded, active entities, like 1500 burning feathers, or 3000 popping balloons. Doesn't matter who's in what shard at the time, only how many entities total are active in all shards.

At least that's what my test results indicated.

Though entities like mobs have significantly more CPU usage when loaded than unloaded, unloaded entities can still cause as much usage as if they were loaded depending on some factors. If they're on fire, for example.

Also, I believe that percentage of CPU usage isn't reliable. I've gotten 9% CPU usage in an idle default worldgen server, 3% in an idle lowest-settings worldgen server, and 2% in an idle highest-settings worldgen server.

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...