Jump to content

New Lag Compensation Idea


Recommended Posts

Lag can be painful. There is a delay between actions noticeable on servers with relatively high ping:
slow_gif.gif.8b0bf7676114fda2c64a74d49dcfb476.gif

The reason this happens, I think, is that the client waits for the server to say you’re idle before even attempting to send the next action you want to do. The server does nothing more than do the action and tell the client when a new action can be done (when you’re idle).
I’ve come up with a solution to this that makes doing action after action practically lagless: Rather than waiting for the client to send the request for each action, all the client has to do is tell the server whether the action button is being held down or not. The server will check if it’s held down every time the player is idle, and if it is it’ll start up the next action automatically.

I made a mod that uses this system to show how much the delay between actions can be reduced:
https://steamcommunity.com/sharedfiles/filedetails/?id=1908298813

 

There are pros can cons to doing this:

Pros:
- No lag when doing action after action

Cons:
- There is potential for accidental actions since it takes time to send to the server when the button is pressed and when it is let go (though this is unlikely)
- Client mods that affect action button actions will not work unless they’re server-sided

Here’s what picking up a bunch of items looks like with the mod on the same server:
fast_gif.gif.17306390f5b1d0e635d91813f57038ae.gif

Note that from what I've tested, this is identical to the speed at which a player picks up items when playing on a world they hosted without caves or mods.

I think the best way to go about this is to make it into an optional feature (defaulting to disabled) players can toggle through the Options screen, similar to movement prediction. Maybe a new entry can be added to the “Lag Compensation” settings list? I'm not sure, but I think seeing this as an option available in all servers would be a great gameplay improvement for a lot of players. Picking up tree loot and seeds from bird cages can be pretty tedious in large numbers due to the delay.

11 minutes ago, lakhnish said:

How would this affect combat? I know they are going to address lag compensation in that area for the next beta, but wasn't sure if it was related.

This change actually doesn't currently affect combat at all - It only makes action-button actions (such as picking up items or harvesting plants) automatically start up as long as the action button is held. The mod (which I made as a preview of this suggestion) will only make changes in that part of the game.

I'm not exactly sure how lag on the combat part of the game could be improved - I think it already works the best it can as long as you have Lag Compensation set to none.

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