10 January Updates - improved packet handling

All of PkHonor's news will be posted here.
Programmer
User avatar
Posts: 5509
Joined: Sun Nov 01, 2009 8:00 pm
Location: PkHonor HQ

10 January Updates - improved packet handling

Postby Mike » Thu Jan 10, 2019 11:03 am

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.

Honor Player
Online
User avatar
Posts: 7446
Joined: Mon Nov 11, 2013 6:13 pm
Location: The Netherlands

Re: 10 January Updates - improved packet handling

Postby Ruler » Thu Jan 10, 2019 11:06 am

Good stuff :thumbsup:

Premium Donator
User avatar
Posts: 46
Joined: Wed Aug 06, 2014 7:32 pm

Re: 10 January Updates - improved packet handling

Postby In killer » Thu Jan 10, 2019 11:06 am

Thanks Mike!!
Image

Known Venturer
Posts: 118
Joined: Mon Jun 19, 2017 4:25 am

Re: 10 January Updates - improved packet handling

Postby Cancerstick » Thu Jan 10, 2019 11:15 am

Mike at it with the quickness!

Much appreciated :mrgreen:

Helper
Online
User avatar
Posts: 1986
Joined: Wed Apr 10, 2013 8:47 pm

Re: 10 January Updates - improved packet handling

Postby Thoby » Thu Jan 10, 2019 12:56 pm

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?
Image
Thanks to The Builder for the amazing siggy!

Honor Player
User avatar
Posts: 31
Joined: Tue Dec 03, 2013 2:36 pm
Location: Australia

Re: 10 January Updates - improved packet handling

Postby Revenantduff » Thu Jan 10, 2019 2:01 pm

Good update. As an Australian, it felt like I had to deal with 300 ping and then another huge delay from yesterday's update.

Premium Donator
User avatar
Posts: 1052
Joined: Wed Aug 19, 2015 5:12 am
Location: Nowhere

Re: 10 January Updates - improved packet handling

Postby Iron bubble » Thu Jan 10, 2019 2:26 pm

good shit feels alot smoother
Image
Roasted by King Roald...

Sir Bubbles

Iron bubble

Sysadmin
User avatar
Posts: 3849
Joined: Tue Dec 01, 2009 8:00 am
Location: Belgium

Re: 10 January Updates - improved packet handling

Postby Rapsey » Thu Jan 10, 2019 4:37 pm

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.

Premium Donator
User avatar
Posts: 1432
Joined: Thu Jun 27, 2013 10:05 pm
Location: ❄ My Igloo ❄

Re: 10 January Updates - improved packet handling

Postby Troll n roll » Thu Jan 10, 2019 4:50 pm

Nice quick fix!
Image
Image

Helper
Online
User avatar
Posts: 1986
Joined: Wed Apr 10, 2013 8:47 pm

Re: 10 January Updates - improved packet handling

Postby Thoby » Thu Jan 10, 2019 5:54 pm

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!
Image
Thanks to The Builder for the amazing siggy!

Next

Return to News

Who is online

Users browsing this forum: Bing [Bot] and 5 guests