Page 1 of 2

10 January Updates - improved packet handling

Posted: Thu Jan 10, 2019 11:03 am
by Mike
In addition to yesterday's updates (which put an end to instant switching), today we're bringing an improvement to the server's packet processing in order to create the best of two worlds.

In the last several years of PkHonor's history, we had a system in place where every packet (action that a player sends to the server, such as walking, eating, clicking objects etc.) would be processed instantly. However, the unintended side effect of this is that players were able to switch gear instantly as well, allowing a small advantage in PvP situations.

Yesterday, we changed this so that all packets were once again processed every game tick (every 600 milliseconds). This in turn resulted in many players complaining about "lag" on the server.
Especially considering our game server is located in the USA, people from Europe would experience this delay most of all. Not entirely surprising, considering a round trip of an internet connection from Europe to the USA can easily take up half a cycle. This would result in packets being processed one game tick later than you would expect them to be processed, resulting in the appearance of lag.

In order to counter this, we have once again put the immediate processing of packets in place. With two exceptions: every packet that handles equipping/unequipping gear or clicking items (such as food or potions) is now only processed every game tick. This way, our players should now experience a minimum of lag - especially those from Europe - while still not allowing for instant gear switching.

We're hoping this change will prove to be the best choice for everyone.

Re: 10 January Updates - improved packet handling

Posted: Thu Jan 10, 2019 11:06 am
by Ruler
Good stuff :thumbsup:

Re: 10 January Updates - improved packet handling

Posted: Thu Jan 10, 2019 11:06 am
by In killer
Thanks Mike!!

Re: 10 January Updates - improved packet handling

Posted: Thu Jan 10, 2019 11:15 am
by Cancerstick
Mike at it with the quickness!

Much appreciated :mrgreen:

Re: 10 January Updates - improved packet handling

Posted: Thu Jan 10, 2019 12:56 pm
by Thoby
Amazing, great work!

Does the combat work on a global tick cycle though? F.e. is it possible that the if you click the other player .3 seconds later than that player clicks you, your hits will always appear 0.3 seconds later than the opponents? Or is that handled in the .6 tick cycle? Most likely the second option, looking at staking for example, but just to be sure?

Re: 10 January Updates - improved packet handling

Posted: Thu Jan 10, 2019 2:01 pm
by Revenantduff
Good update. As an Australian, it felt like I had to deal with 300 ping and then another huge delay from yesterday's update.

Re: 10 January Updates - improved packet handling

Posted: Thu Jan 10, 2019 2:26 pm
by Iron bubble
good shit feels alot smoother

Re: 10 January Updates - improved packet handling

Posted: Thu Jan 10, 2019 4:37 pm
by Rapsey
Thoby wrote:Amazing, great work!

Does the combat work on a global tick cycle though? F.e. is it possible that the if you click the other player .3 seconds later than that player clicks you, your hits will always appear 0.3 seconds later than the opponents? Or is that handled in the .6 tick cycle? Most likely the second option, looking at staking for example, but just to be sure?
There are only global tick cycles (not per player) and combat is always handled in these, that much has never changed. The changes here are about server responsiveness.

Simplified example: if you click to attack another player or NPC the server will immediately let you start attacking, so it doesn't feel laggy. But the whole combat processing, the server-side calculations of the hits, that happens in the global cycles. Your hit doesn't get calculated the moment your attack-click is received by the server. This only marks your account as "currently attacking player/NPC X" (instantly) and then in the next cycle the server will look at your position, weapon speed etc to determine if there should be a hit.

Re: 10 January Updates - improved packet handling

Posted: Thu Jan 10, 2019 4:50 pm
by Troll n roll
Nice quick fix!

Re: 10 January Updates - improved packet handling

Posted: Thu Jan 10, 2019 5:54 pm
by Thoby
Rapsey wrote: There are only global tick cycles (not per player) and combat is always handled in these, that much has never changed. The changes here are about server responsiveness.

Simplified example: if you click to attack another player or NPC the server will immediately let you start attacking, so it doesn't feel laggy. But the whole combat processing, the server-side calculations of the hits, that happens in the global cycles. Your hit doesn't get calculated the moment your attack-click is received by the server. This only marks your account as "currently attacking player/NPC X" (instantly) and then in the next cycle the server will look at your position, weapon speed etc to determine if there should be a hit.
Okay perfect, thats what I thought. Thanks for the explaination!