Reducing block lag

Discussion in 'Plugin Development' started by oscarshi1995, Aug 17, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    oscarshi1995

    I have not looked too much into packets myself before but I would assume block lag is caused by a packet sent by the server to the client before the bukkit event is registered. so I would assume to reduce block lag I could delay the blockchangepacket sent from the server to wait for the bukkit event to process? Or am I totally wrong? xD
     
  2. Offline

    teej107

    Block lag in my experiences happen when the server is actually lagging behind or when your connection between you and the server is slow. There is nothing you can do with slow connections (not with Bukkit anyway) but you can solve most server lag issues by installing lag reducing plugins or an "other server jar".
     
  3. Offline

    Necrodoom

    You cannot "solve" lag, you can try reduce it. There is no such thing as no lag.
    Without information about said lag no suggestions can be made. Especially not encouraging usage of unofficial builds, teej107
     
  4. Offline

    mythbusterma

    teej107 Necrodoom oscarshi1995

    Most of the time, the "block lag" he's refering to is caused by players never being updated, or the update packet being delayed, specifically the IWorldAccess objects are never notified, or the packet they send is being lost in transit, delayed, etc.

    I don't understand what you would do to fix this problem, however.
     
  5. Offline

    fireblast709

  6. Offline

    mythbusterma

    fireblast709

    Hm, seems like an odd way of doing it, but I suppose you could do this. This kinda sounds like something Spigot does to "optimize" or whatever they call it. Regardless, this would be very difficult to accomplish.
     
  7. Offline

    fireblast709

  8. Offline

    mythbusterma

    fireblast709

    Hm, the logic behind the change sounds pretty sound, however.
     
  9. Offline

    fireblast709

    mythbusterma more updates. Amaranth told me it was because back in the day, Minecraft didn't assume the block was broken (what it does today, so the packet does nothing)
     
  10. Offline

    oscarshi1995

    so... my idea would work?
     
  11. Offline

    fireblast709

    oscarshi1995 It mostly revolves around what the client assumes, which is something you cannot really influence.
     
  12. Offline

    oscarshi1995

    assuming the server fails to send a packet reply does the client display the block as broken or not?
     
  13. Offline

    BlueMustache

    oscarshi1995
    You could always make a plugin that checks the player's ping using packets. Then depending on this data.

    Fast Ping: <100ms
    Medium Ping: 100-250ms
    Slow Ping: 250-500ms
    Laggy Ping: >500ms

    If they are between slow and laggy, make your plugin kick them, or proxy them to a server closer to the player.
    Which you could deduce via GeoIp.
    I might make a plugin that does this soon.
    Since laggy internet, not servers, are big problems for networks, just kick the laggy players that are complaining.
    That will save you headaches, hear tearing out, and yes, even server resources that were wasted on that player.

    Good proposal?
    -Blue
     
Thread Status:
Not open for further replies.

Share This Page