Sounds causes game to lag/stutter

Discussion in 'Technical Discussion' started by defonten, Apr 9, 2016.

  1. defonten

    defonten Avid Boxer

    Joined:
    Nov 21, 2015
    Messages:
    251
    Likes Received:
    29
    Great. Thanks a lot Andy!
     
  2. defonten

    defonten Avid Boxer

    Joined:
    Nov 21, 2015
    Messages:
    251
    Likes Received:
    29
    Hi @Andy

    any progress on this issue? Sorry for bugging but I have already released my app on AppStore for more than a week ago (before this issue arose), and now I'm on hold with Android because of this issue.

    Thanks
     
  3. defonten

    defonten Avid Boxer

    Joined:
    Nov 21, 2015
    Messages:
    251
    Likes Received:
    29
    @Andy
    Hate to be the moaning one, but just a kind reminder that I'm holding the release on android because of this. May be there's a quick temporary fix for this? Thanks
     
  4. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    @defonten

    Programmer was looking at this Friday and Monday. There are several factors at play here. Limitations of the sound engine and the power of the device and the quantity and quality of sounds playing. The programmer did not see much delay on his devices... here are some things that can help and did help on my Galaxy SII.

    1) Reduce the length of the sound (try a short tick noise)
    2) Reduce the size of the sound (shorter sound should be smaller)
    3) Remove any extra silence from the start and end of sound file
    4) Use a single channel (mono) sound
    5) Turn off the reward labels

    Your sound is fading in which is probably most of the issue about 1/20th of a second of silence. It can be improved greatly by following the provided advice.
     
    Sean Buildbox likes this.
  5. Kadri246

    Kadri246 Avid Boxer

    Joined:
    Mar 1, 2016
    Messages:
    243
    Likes Received:
    77
    @Andy I did all of that and still no instant solution. I do believe it has something to do with Touchwiz, because I had the same problem with my S6 Edge, and the only thing that solved this was when I factory reset after having issues with my rom upgrade. Other devices didn't show this lag, not even on a cheap Blu.
     
  6. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    @Kadri246 This is a different issue. Your issue sounds like a special case. The main issue for @defonten is the silence at the beginning of the file. Some of the other suggestions will help dial it in even more.

    Interesting though is that the Galaxy SII I am using is supposed to have TouchWiz but I have no idea how to check it, but it seems to not be affecting anything that I have noticed.
     
  7. defonten

    defonten Avid Boxer

    Joined:
    Nov 21, 2015
    Messages:
    251
    Likes Received:
    29
    @Andy
    No, it didn't help. I trimmed all files to start from sound instantly, made them joint stereo, and even tried lowering bitrate of sound. It's still lagging. Length of my files is approx 1 sec. It still lags. Please help.
     
  8. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    What is your device hardware?
     
  9. defonten

    defonten Avid Boxer

    Joined:
    Nov 21, 2015
    Messages:
    251
    Likes Received:
    29
    It's Android 4.4.2 KitKat
    Samsung Galaxy S4 mini
     
  10. defonten

    defonten Avid Boxer

    Joined:
    Nov 21, 2015
    Messages:
    251
    Likes Received:
    29
    @Andy Also tried, Joint Stereo, Mono, even 8bit (!) sound.. It's still lagging especially on defeated sound.
     
    Last edited: Apr 28, 2016
  11. shadi3900

    shadi3900 Boxer

    Joined:
    Oct 14, 2016
    Messages:
    24
    Likes Received:
    3
    @defonten I got the same issue, but just on my s7 edge and I tried it on a cheap sony device and it just runs perfectly without any lags . Do you got a solution for it?
     
  12. defonten

    defonten Avid Boxer

    Joined:
    Nov 21, 2015
    Messages:
    251
    Likes Received:
    29
    @shadi3900 Nope. After continues talks with support I just gave up. For my runner game on Android platform every time new scene loads - game lags a bit. On iphones game is just fine. I was only able to reduce those lags a little bit by reducing atlases count and reusing images across menu and game. But lags on android are still there.
     
  13. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    How many atlases? It sound like you are bumping the limit of the memory on the device?
     
  14. godmanomar

    godmanomar Boxer

    Joined:
    Jan 25, 2018
    Messages:
    1
    Likes Received:
    0
    @defonten how did you end up fixing your sound lag problem on Android because I'm stuck at the same problem now when I export my game to Android it lags but when I take the sound out it doesn't lag
     

Share This Page