10 January Updates - improved packet handling

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

10 January Updates - improved packet handling

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

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

Re: 10 January Updates - improved packet handling

Post by Ruler » Thu Jan 10, 2019 11:06 am

Good stuff :thumbsup:

User avatar
In killer
Premium Donator
Posts: 51
Joined: Wed Aug 06, 2014 7:32 pm

Re: 10 January Updates - improved packet handling

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

Thanks Mike!!
Image

User avatar
Cancerstick
Wise One
Posts: 537
Joined: Mon Jun 19, 2017 4:25 am

Re: 10 January Updates - improved packet handling

Post by Cancerstick » Thu Jan 10, 2019 11:15 am

Mike at it with the quickness!

Much appreciated :mrgreen:

User avatar
Thoby
Developer
Posts: 3120
Joined: Wed Apr 10, 2013 8:47 pm
Location: Thoby#0008

Re: 10 January Updates - improved packet handling

Post by 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?
Feel free to send me a message, I'd gladly have a chat!
Image Image

User avatar
Revenantduff
Premium Donator
Posts: 151
Joined: Tue Dec 03, 2013 2:36 pm
Location: Australia

Re: 10 January Updates - improved packet handling

Post by 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.
Image

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

Re: 10 January Updates - improved packet handling

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

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

Sir Bubbles

Iron bubble

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

Re: 10 January Updates - improved packet handling

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

User avatar
Troll n roll
Premium Donator
Posts: 2004
Joined: Thu Jun 27, 2013 10:05 pm
Location: ❄ My Igloo ❄

Re: 10 January Updates - improved packet handling

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

Nice quick fix!
Image
Adam the lion wrote:If you are making super pots for profit on an rsps, you really need to re-evaluate your life.

User avatar
Thoby
Developer
Posts: 3120
Joined: Wed Apr 10, 2013 8:47 pm
Location: Thoby#0008

Re: 10 January Updates - improved packet handling

Post by 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!
Feel free to send me a message, I'd gladly have a chat!
Image Image

Post Reply