Jump to content

Option to chain actions server-side


Recommended Posts

One feature I've wanted for a while is an option to have the chaining of consecutive actions handled by the server instead of the client. While the action button is held, the server will automatically make the player do a new action when the current one ends as opposed to waiting for another input.

How the game operates currently (at least to my understanding) is that most actions have to be individually initiated by the client. When you pick up a series of items, for example, you'll pick up one item and then your client will wait until that item is picked up to tell the server to pick up the next. When there's latency, this causes a delay between each pickup action. It's especially noticeable (and detrimental) when the latency is high - picking up many items in a common scenario, starting right at the early game when you chop trees for wood and have to pick up the 3 logs and 2 pinecones that drop on the ground.

My idea is to have the server receive the action button input itself (which I believe it used to do already, if it doesn't still do that in the current version) and while the action button is down, new actions are initiated by the server when the player is idle. This would eliminate that delay.

This is not without drawbacks, though, which is why I specify that it should be an option - If the server is the one picking actions, then client mods that restrict what the player can pick up (such as ones that make the player avoid accidentally picking flowers) wouldn't work, and players with high latency might find themselves doing more actions than they intended to do. Still, I think it would be a great option to have to make playing with friends on 100 ping or so more bearable.

Would it be possible to design it in such a way that mods that restrict what actions can be done, or change the order in which actions are done, could still work?

Perhaps by having the client queue up a list of the next couple actions, and then sending that list to the server, and by the time the server gets to the end of that list, it's been sent an update to the list, resulting in no delay between actions.

This way mods could simply change which items can be added to the list, and decide in which order they are added.

This should also mostly solve the issue of extreme lagspikes causing a large amount of unintentional actions, since if the client loses contact with the server, the list will stop being updated, so only a couple of accidental actions will be performed.

4 minutes ago, bjanmanjs said:

Would it be possible to design it in such a way that mods that restrict what actions can be done, or change the order in which actions are done, could still work?

Perhaps by having the client queue up a list of the next couple actions, and then sending that list to the server, and by the time the server gets to the end of that list, it's been sent an update to the list, resulting in no delay between actions.

This way mods could simply change which items can be added to the list, and decide in which order they are added.

This should also mostly solve the issue of extreme lagspikes causing a large amount of unintentional actions, since if the client loses contact with the server, the list will stop being updated, so only a couple of accidental actions will be performed.

That definitely sounds plausible, though a lot more complex (and better) than what I was initially going for. I'm not sure how well those sorts of mods would support such a feature without receiving an update - the search functions for them usually rely on the lesser priority items only getting picked if the higher priority ones are gone from the scene.

On 1/11/2023 at 5:18 AM, Rickzzs said:

The need is that client can send an array of actions instead of one by one. It can be interrupted of course.

This sounds like action queue where the queue is synced with the server. I like the idea.

That would require implementing the OP action queue into the game, in a stronger form

Speedrunners might not like that, there is something beautiful about speedrunning the game with only manual actions and no automation

If a server-side actionqueue was implemented officially, speedrunning the game would lose appeal and become frankly really boring at times

 

I know speedrunners are like 0.001% of players, but wanted to mention them as their skill can inspire many to play the game

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