10 January Updates - improved packet handling
- Mike
- Programmer
- Posts: 6348
- Joined: Sun Nov 01, 2009 8:00 pm
- Location: PkHonor HQ
10 January Updates - improved packet handling
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.
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.
- Ruler
- Honor Player
- Posts: 7541
- Joined: Mon Nov 11, 2013 6:13 pm
- Location: The Netherlands
- In killer
- Premium Donator
- Posts: 51
- Joined: Wed Aug 06, 2014 7:32 pm
Re: 10 January Updates - improved packet handling
Thanks Mike!!
- Cancerstick
- Wise One
- Posts: 537
- Joined: Mon Jun 19, 2017 4:25 am
Re: 10 January Updates - improved packet handling
Mike at it with the quickness!
Much appreciated
Much appreciated
- Thoby
- Developer
- Posts: 3120
- Joined: Wed Apr 10, 2013 8:47 pm
- Location: Thoby#0008
Re: 10 January Updates - improved packet handling
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?
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?
- Revenantduff
- Premium Donator
- Posts: 151
- Joined: Tue Dec 03, 2013 2:36 pm
- Location: Australia
Re: 10 January Updates - improved packet handling
Good update. As an Australian, it felt like I had to deal with 300 ping and then another huge delay from yesterday's update.
- Iron bubble
- Premium Donator
- Posts: 1278
- Joined: Wed Aug 19, 2015 5:12 am
- Location: Nowhere
Re: 10 January Updates - improved packet handling
good shit feels alot smoother
Roasted by King Roald...
Sir Bubbles
Iron bubble
- Rapsey
- Sysadmin
- Posts: 5508
- Joined: Tue Dec 01, 2009 8:00 am
- Location: Belgium
Re: 10 January Updates - improved packet handling
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.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?
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.
- 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
Nice quick fix!
Adam the lion wrote:If you are making super pots for profit on an rsps, you really need to re-evaluate your life.
- Thoby
- Developer
- Posts: 3120
- Joined: Wed Apr 10, 2013 8:47 pm
- Location: Thoby#0008
Re: 10 January Updates - improved packet handling
Okay perfect, thats what I thought. Thanks for the explaination!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.