How do I prevent my game from crashing?

  • Hey everyone,

    My game is crashing randomly when testing it on older devices. As soon as I remove all events regarding music it works great without crashing. Also on some devices I experience audio distortion when playing my music. I have tried different kHz and all of the available bitrates that are available to choose when importing into Construct 3.

    This is such a frustrating problem and I have been stuck on it for several days now and I can't find any solution to it. Is there anyone out there who has experienced something like this and what did you do to solve it?

    Tagged:

  • Reduce the memory usage

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • plinkie Yeah, I managed to reduce the memory usage but the audio distortion is still present. Have no idea what to do to prevent popping and weird sounds coming out from the speakers from some devices.

  • Unless you have uncovered a bug the only thing I can think that would cause such distortion and audio related crashes are stacked samples or effects.

    Make sure no sound is being re-triggered repeatedly without stopping it first.

    especially for longer samples, especially if mistakenly being triggered every tick, will cause sample stacking, amplifying and distorting the sound and can also kill some audio processors.

    Also check effects use.

    In a similar way it is easy to make the mistake of adding the same effect again and again to a sound rather than changing the effect.

    This stacks the effect causing the same issues as stacked samples.

    edit - if you solved the crashing by reducing file sizes then maybe check your samples in an audio editor, maybe those pops and clicks are actually in the files. also if the samples are heavily compressed and maximized then probably not a good idea to play at 0 db as this can cause clipping in some audio hardware giving pops and clicks.

  • NetOne Yes, this could have been the case. I have actually tried to disable all other sound effects and events, but the distortion is still present.

    However, I removed the Sine effect of a sprite in that layout and somehow this made the distortion go away. It seems like continuous effects looping are affecting the performance very much.

    But what also boggles my mind is that when I tried another audio file which was MP3, the distortion went away without removing the Sine effect. Which makes me think that some audio files must be heavier for Construct to handle. I have tried .WAV that converts into webm and MP3 but can't understand what makes one work without distortion and the other one not.

  • hmm sounds like some sort of system overload. is your project hosted can we have a try? or try to replicate the issue in a simple project and maybe post here or send into he github bug tracker.

  • NetOne I have not hosted it anywhere and to be honest I am prepared to see this "little" issue through.

    It's a very small problem and I can only replicate the issue on iPhone X all of my other devices work as intended so I think it actually might be that iPhone X is very sensitive for this sort of issue.

  • Probably a stupid question, but did you put music into Music folder or into Sounds? Audio files in these folders are processed differently.

  • dop2000 I tried both actually cause I understood it as the Sounds folder loads the whole track before playing and the music folder streams, and I was curious to see if it made any difference. But there is no difference with the distortion no matter the folder.

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