Audio and Event Lagging in 1.3.1

Discussion in 'Bukkit Help' started by GravelSocks, Aug 8, 2012.

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


    Have other server operators been noticing all the audio/event lagging in 1.3.1? It seems like a glaring problem, but I don't see any threads here about it. It may not be a bukkit or server-side problem - could be a client issue, I suppose. Just wondered if it is a known problem and/or one where a fix is already underway?

    Is anyone else seeing this problem?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 27, 2016
  2. Offline


    Don't Bump Within 12 Hours.
  3. Offline


    I have seen this too, the audio lags by about half a second and it really annoys me.

    I believe this is because instead of the client just playing the sound when a block is placed the server has to tell the client to play the block place/break sound.
  4. Offline


    Why is this thread in the Help forum? If anything, it belongs in the discussion forum. Also, MOD - it would be nice to have a message that you have moved a thread so that the user knows where to find it.

    Thx - iKeir - I see this problem when just moving around - walking sounds are clearly delayed. Sometimes, I also see it as a lag in my ability to hit monsters.

    I just noticed the thread below about lag - I'm using FamilyJewels, which is similar to Orebfuscator - maybe that is having an impact. I will check it out.

    Lag Caused By Orebfuscator?
  5. Offline


    server sends sound packets to client for all sounds in 1.3.1. thats what both causes your sound delay and the lag that causes sound delay.
  6. Offline


    Well...that would help explain it, but given the lag, the design change seems to have some implementation issues, despite the improvement in abstraction. Maybe the performance issues can be resolved/improved. However, based on what you say and the problems we see, I wonder how the change has been implemented.

    For example, hopefully, if there are sounds that the client needs to know about (and maybe install/cache), then they are being sent only once as a sync event between the server and client that happens in a control channel upon client connection (assets spooled out in the background). Then, the client could play local sound assets triggered from the server by simple ID packets that are tied to events. Server-specific graphical assets could be handled in the same manner.

    In this kind of model, sound and graphical assets would need to be associated with a unique ID (or maybe IP-based) tied to the server to prevent ID conflicts -- or maybe plugin-ID-based. Frequently-used sounds could/should be cached for fast client play-back. There shouldn't be a need for any lag which strains real-time perception and execution.

    Anyway, these comments are merely hypothetical. It would be nice to hear from someone who knows exactly how the change has been implemented and what possibilities there might be to improve the performance.
  7. Offline


    Idk what your sound lag is, but for me, I place a block, and it doesn't play the sound of it being placed. After a short period of time, all the sounds of all the things I did in that time play back at once, which is REALLY annoying. This is happeneing ALL the time. I think it has to do with the new dev build, before it, I never had this problem.
  8. Offline


    It's actually a 1.3 issue mojang has been having. Most people have it and it's actually happens in single player also sodont worry mojang will patch this. Most youtubes are getting another tho
  9. Offline


    If, in fact, the server is sending actual sound data to the client on a continuous basis, it might need more of an architectural rethinking rather than just a simple patch, speculatively speaking.

    It would be nice to hear from someone who knows the technical details of the server -> client asset transfer protocol to better understand the lag we are all seeing.
  10. Offline


    Here's hoping Mojang will fix this sooner rather than later in 1.3.2.

    In the meantime, I've written a client-side mod to fix this: NoSoundLag.

    I think this was just an oversight; no additional major architectural changes should be necessary. After all, block destruction sounds are played immediately without the server's direction.

    Here's some protocol detail:

    pre 1.3: Player tries to place a block > Client plays sound > Client sends packet to server > Server places block > Server sends packet notifying client that block was placed

    post 1.3: Player tries to place a block > Client sends packet to server > Server places block > Server sends packet notifying client that block was placed > Server sends packet telling client to play sound > Client plays sound

    So the lag you're hearing is exactly that: your sounds are being delayed by your round-trip network latency. Two packets instead of zero.

    Note that the actual sound data is not being sent each time, just a string identifier (e.g. "step.gravel"). This is still subject to network latency, though.
  11. Offline


    Thanks for the additional explanation, Ben.

    It seems like there might be some other issue besides just round-trip lag, however. I'm on my own Intranet where there should be little or no lag and have tested with me as the only connection (no server load). Also, the round-trip issues shouldn't be a factor in single-player mode, but there are also reports of single-player lag. Something is definitely awry.

    So, is your plugin just short-circuiting the sound back to pre-1.3 mode? The problem is that it's not just sound. I can attack and kill mobs, run past them, turn around, then 3-4 seconds later they suddenly die while I'm standing there just looking at them. There are obviously numerous event-related lag issues in the 1.3+ client-server interaction. Would your plugin also address this kind of event issue, or is it only for sound?
  12. Offline


    Sounds like there's some other issues going on with your setup. :( Are you running on an older machine? How's your CPU/memory usage?

    Check out this post by Jeb_, where he explains:
    Yes, the NoSoundLag mod effectively short-circuits the sound event, playing it immediately on the client. It also has to take the additional step of ignoring the subsequent sound event sent by the server, otherwise you'd have weird echoes.

    It only addresses the sound lag caused by 1.3.1's new packet flow. There's no magic bullet to defeat Minecraft lag in general I'm afraid.
  13. Offline


    Thanks for the additional explanation. and Jeb post.

    No issues with my setup. The client is running on an 8gb core i7 machine with a high frame rate. The server is a dual core w/ 8gb. Everything was fine prior to the 1.3 update. It's obviously a minecraft-related event problem based on the new version. Could be client, server, or plugin. I don't know yet. I have to do some stripped down testing to rule out plugin effects.
  14. Offline


    Thanks, now that I think about it, it has been happening in my singleplayer worlds, but I just thought that was just my PC, it's terrible.
    Rever likes this.
Thread Status:
Not open for further replies.

Share This Page