1. PunKeel

    PunKeel Retired Network Developer

    PunKeel
    MVP+
    Messages:
    10
    Hello everyone!

    My name is Maxime, aka PunKeel. I joined the Hypixel Server just over 3 months ago as a developer. During those 3 months, I have been working on tools for our Moderation team, Watchdog / cheat detection and other network infrastructure related tasks. My goal here is simple: to make sure your perception of the server is as good as it can be, including reducing the amount of cheaters on the server and improving stability.

    This week, I focused on an issue you might be well aware of: hit registration e.g whether or not a hit from one player to another player registers. Thanks to your feedback we found issues within the code and resolved them very quickly. In this post I break down the causes of those issues and our working solutions - continue reading to find out more.

    ▶ What was the problem with hit registration?
    In order to fix the issue, I first had to understand what caused it. This step is important to understand what can be done about it.
    • As some of you may know, Minecraft uses a default reach of 3 blocks.
    • Everytime you hit an entity, your "reach" to this entity is calculated as the distance from your player's head to the entity's hitbox nearest point.
    • You can see the hitbox when pressing F3+B. For a player, this hitbox is 0.6 x 0.6 x 1.62 blocks.
    This is the right way to calculate the reach, but it causes a first issue: as the reach is calculated from the top of your head, the lower parts of the body are harder to hit.

    In the vanilla Minecraft Server code, reach is calculated using another method, the distance from your head to the entity's head. This does not account for the hitbox and gives problematic reach values when players are not at the same Y level. So the default reach value in the Minecraft Server is 6 (which is a lot more than 3 blocks)! This allows for several exploits (also knows as 'Reach hacks'), and is clearly not acceptable.

    The server is also faced with an other issue: latency. While on your screen (your client) you may see the person you are fighting in a certain position, he might actually have moved somewhere else already, but this information takes some times to travel between the server and your PC via the internet. This creates situations where on your screen (client) you should have hit someone, when on the Server he already moved out of the way.

    This explains the default value of 6 blocks, but feels wrong anyway: it becomes easier for players with a low ping to place hits.

    Another issue in the Minecraft Server code is the Line of Sight check: if you can't see your opponent, your reach is reduced to 3 blocks server side. This Line of Sight check only works if you are able to see the head of your opponent - it assumed if you see the entity, it can see you too, but when hitting other players this is not always the case.

    [​IMG]

    In the above picture, if I was to hit this poor snowman, the line of check would consider I can't see him directly because it can't possibly see me. The broken line of sight check from head to head leads to reduced reach on the server side.

    There is also a bug in the Minecraft client code which makes it seem like your hits register even when they shouldn't. When you deal a critical hit, or hit with a item enhanced with sharpness, you will see white or blue particles. These particles indicate you dealt additional damage. The Minecraft Server you are connected to should be responsible for these particles, but in reality the client displays them anyway. Even if the Server sees your hit as invalid, your client displays the particles as if you landed a hit correctly.

    This is, to my knowledge, the worst bug and the one I decided to tackle: it leads to all the server bug issues being visible to you.

    ▶ What did we change?
    In order to improve hit registration, we had to dive deep into the Minecraft Server code. This is quite a scary place, but we brought torches. The hit registration issues are mostly caused by latency, so if we are able to tell where your opponent was when you hit it, we are able to check if your hit is legitimate. This is exactly what the new hit registration system does: it checks where the entity you hit was when you did hit it, and validates (or not) the hit.

    This easy solution - though easier said than done - was our first change to the hit registration, 2 days ago.
    Unfortunately this meant we were also accepting hits from 5+ blocks away, and in some situations it made players look like they were using reach exploits.

    The second version (was present on the server on the 4th and 5th of January) meant to reduce the maximum reach when hitting. A subtle bug was introduced, leading to some hits being refused without reason, but was quickly detected thanks to your feedback.

    The third version, deployed a few hours ago on the server, fixes the way the reach is calculated on our side so that entities on different heights are still able to fight decently. This last change involved a lot of math, so I will spare you the details. Though it's worth noting the lower you are, the easier it is to deal hits.

    ▶ Why don't you just fix Hit Registration?
    We would love to be able to fix Hit Registration, but unfortunately we have no control over the code in your Minecraft Client, the game that you run on your PC. There are lots of elements of the Minecraft Client code that make very little sense from our point of view as a server trying to provide online PVP games that are fun and fair for everyone. If we had some control over the client (or the issues were resolved on Mojang's side) we could for example prevent the particles from displaying on critical hits even when the hits don't land.

    When making any changes to systems like Hit Registration we also need to keep a high level of cheat detection. Players must not be banned because of our changes, but hacking must also not be made easier.
    We also know that this issue is impacted (negatively) by latency, and although we would like to provide everyone with the same game play quality, this is not an easy-to-fix issue.

    There are more than 35 games on the Hypixel Server, and we have to make sure our changes are compatible with all of them without impacting the gameplay in a destructive way. We also have to support multiple versions of Minecraft from 1.8 all the way through to 1.12, and have combat between versions feel as similar as possible. We need to find that right balance, which takes time, and your feedback helps us a lot.

    ▶ Will the new Hit Registration stay?
    As you may have noticed, we made several changes to hit registration over the past few days.
    We feel like this iteration is a step in the right direction. It might even be good enough, but we know it is still not perfect and are willing to improve it — until it becomes impossible to improve it further.

    When making these changes, we try our best to test all the possible situations, but we know this is not humanely possible: edge cases are hard to trigger (thanks, latency), and we can't think of them all.

    But in short we are improving hit registration every day with your feedback. Please let us know what you think in this thread :)

    ▶ Do players with a low ping / high ping now have an advantage?
    No, they do not.

    We want to provide the best experience for all of our players, and this includes non-US players. The way we made our changes, all players get equal chances of winning a fight, no matter what their ping is (to some extent, of course).

    ▶ How can I help?
    We are looking for feedback from 7th jan or after so we can keep making improvements. Any feedback from before January 7th is not helpful as we already improved the code since then.

    To help us, all we ask for is your feedback on recent reach changes. To provide us with the feedback, just reply to this thread with the following information:
    Code:
    [B]My IGN[/B]:
    [B]Minecraft version[/B]:
    [B]Hypixel Minigame I was playing[/B]:
    [B]Comments[/B]:
    We are looking for constructive feedback only - any replies that break the rules or are overly negative will be removed to keep the conversation about improvements and feedback.

    Thanks in advance for your help,
    PunKeel
     
    #1
    Last edited by a moderator: Jan 6, 2018
    • Like x 444
    • Useful x 24
    • Hype Train x 23
    • Agree x 11
    • Mod Emerald x 10
    • Dislike x 8
    • Funny x 4
    • Creative x 4
    • Disagree x 2
    • Admin Diamond x 2
    • Helper Lapis x 1
  2. shahed

    shahed Well-Known Member

    shah3dx
    MVP++
    Messages:
    1,829
    You’re definitely doing the right thing. Great job! You guys have really been stepping up your game recently and I️ love it!
     
    #2
    Last edited: Jan 6, 2018
    • Like Like x 38
    • Dislike Dislike x 16
    • Agree Agree x 7
  3. Hit reg and lag have been really wonky, is it related to these changes?
     
    #3
    • Agree Agree x 8
    • Like Like x 6
  4. Great to know it's been being worked on! Welcome to the team! :D
     
    #4
    • Like Like x 5
    • Agree Agree x 3
    • Hype Train Hype Train x 1
  5. Odsay

    Odsay Well-Known Member

    ODsAY
    MVP
    Remonetize MEMBER
    Messages:
    1,036
    ;)
     
    #5
    • Dislike Dislike x 12
    • Like Like x 2
    • Agree Agree x 1
  6. Awesome! :p
     
    #6
    • Like Like x 5
  7. ItsTene

    ItsTene Well-Known Member

    ItsNotTene
    YouTuber
    Mimi OFFICER
    Messages:
    720
    Awesome
     
    #7
    • Like x 26
    • Hype Train x 2
    • Dislike x 1
    • Agree x 1
    • Useful x 1
    • Creative x 1
  8. HarvehOG

    HarvehOG Well-Known Member

    HarvehOG
    MVP+
    Crevice OFFICER
    Messages:
    765
    Nice.
     
    #8
    • Agree Agree x 2
  9. Piano

    Piano Well-Known Member

    Piano
    VIP+
    The Ensemble GUILDMASTER
    Messages:
    16,207
    With these changes in hit registration in place, should there be any change in what players should look for when it comes to hackers, and if so, do you have any pointers on what should look suspicious?
     
    #9
    • Like Like x 12
    • Useful Useful x 6
  10. Potato
     
    #10
    • Agree Agree x 7
    • Dislike Dislike x 3
    • Like Like x 1
  11. Metamorphy

    Metamorphy Well-Known Member

    Messages:
    1,834
    Good to hear it's being worked on some. Awesome changes guys, keep up the great works :)
     
    #11
    • Agree Agree x 1
    • Hype Train Hype Train x 1
  12. Thank you so much for asking for feedback for hit registration. My general problem (for me) is that all players seem to have a longer reach then I do. I live in the Australia, and this stuffs up many of my fights. I just want it to come down to skill, not the amount of ping.
     
    #12
    • Agree Agree x 6
    • Like Like x 1
  13. yes
     
    #13
    • Like Like x 2
    • Dislike Dislike x 1
    • Agree Agree x 1
  14. WolfRift

    WolfRift Well-Known Member

    WolfRift
    MVP++
    NoLifes MEMBER
    Messages:
    1,740
    This explains so much
     
    #14
    • Like Like x 1
  15. Optay

    Optay Well-Known Member

    Optay
    MVP+
    SkyLegion GUILDMASTER
    Messages:
    1,312
    Ooooo interesting
     
    #15
    • Agree Agree x 1
  16. Texay

    Texay Well-Known Member

    Texay
    MVP++
    Magic Minemen OFFICER
    Messages:
    705
    Im looking forward to PvPing with this improvement! Also, looking forward to a more fair system, for all of the low and high “pingers”
     
    #16
    • Like Like x 1
    • Funny Funny x 1
  17. mitlar

    mitlar New Member

    MITLAR
    VIP
    Disowned MEMBER
    Messages:
    1
    nice
     
    #17
    • Funny Funny x 1
  18. Questings

    Questings Well-Known Member

    Questings
    MVP+
    Messages:
    1,573
    Nice job!
     
    #18
  19. Awesome! Good to know some backend and infrastructure is being worked on. Looking forward to the updates :)
    Also, congratz on joining the staff team.
     
    #19
    • Like Like x 2
  20. fluf

    fluf Well-Known Member

    Likespammer
    MVP++
    Laint MEMBER
    Messages:
    2,242
    Snowmen lives matter. Stop Blocky Snowman abuse today at store.hypixel.net
     
    #20
    • Funny Funny x 23
    • Like Like x 3
    • Agree Agree x 2
    • Useful Useful x 2

Share This Page