Perf problems with Music on iPads

0 favourites
  • 4 posts
From the Asset Store
For problem solving, puzzles, bubbles, platforms and other adventures.
  • Hi,

    I'm developing a game in the browser mainly for Apple hardware (I don't have much choice in the matter) and I'm encountering a problem that completely destroys the game experience.

    After countless tests, I'm pretty sure that there is a memory leak when I play music on Apple hardware. Indeed, after playing a certain number of tunes, the game starts to gradually lose fps until it restarts the page due to a memory shortage problem.

    These problems have been seen on Gen 6 iPads and on my old Macbook Pro 2011. On Safari, and also on Chrome.

    For some reason I can't figure out, this problem does not appear on an iPad Pro.

    While testing with a low-end android (wiko), a recent samsung galaxy, a Windows computer, no problem either.

    Possible ways to solve the problem

    I obviously tried a number of things:

    • unload the music once it's finished: it's useless
    • stop the music once it's finished: it's useless (Apple devices don't manage several audio tracks simultaneously and stop the previous track as soon as a new one is launched)
    • I'm starting to wonder if I don't want to turn the music into sounds to test it. Any optinion?

    Has anyone encountered a similar problem?

    To illustrate this problem, I made an example that plays music every second (at -50db not to ruin your ears). The problem explained is fairly well reproduced in this example, but takes a few minutes to crash the page.

    A link to the .c3p

    Thanks for your insights!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Try to set the Framerate mode to v-sync in the advanced properties settings and look if that helps.

    Unlimited should only used for testing.

  • Indeed. The unlimited mode was set in order to see more variation in the FPS during the test.

    The game is indeed in V-sync.

  • Quick update:

    If I put all the music in the sounds folder and preload the sounds, I have no leak. However, as soon as I start to try unloading the sounds (to lighten the memory load), I have crashes again.

    As my game has 10 minutes of sounds, it's a 100MB to store in addition to all the visuals... It's not really ideal, especially for low-end devices.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)