Audio is going nut online, I'm clueless

0 favourites
  • 5 posts
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • Greetings constructors,

    The title said it. I wanted to be le creative guy and did not make any transition between the menu of my prototype and the first level. When you click play, the titlescreen music is stopped, then followed by one or two matching melodies until you reach the ground (the actual start of the level).

    Everything is working fine in the preview.

    But here's the twist : once the project has been uploaed online, the audio files don't always start. It's pretty random. Sometimes, it's running as intended. Sometimes, the titlescreen music doesn't start, but the right song supposed to start just after is working. Sometimes, nothing work at all, then BOUM everything start at the same time. And I'm clueless.

    I tried to test my stuff with all my musics within the Sounds directory instead of the Musics one (just to see if it's a loading problem), but nope, same results. I don't know what could be wrong with my events. I mean, it's working on preview, and they are fairly simple, like :

    Why the damn croissant fixIntro doesn't always start ? I crave for any hints. I have missed something, but I have no idea what. Same results no matter the browser. Same results if tested on local (using WAMP). Same results if tested with another track. Always random. Any form of help would be greatly appreciated.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don;t think you need trigger once as on start of layout is kind of trigger once already ( not sure if that makes a difference with your problem )

    These days sounds will not play in browsers until you click on something first, that could be your problem.

    You should have a start game layout, so players click on start game or play button and then go to the actual game. That will count as purposeful interaction by the player and sounds will play from that moment on.

  • These days sounds will not play in browsers until you click on something first, that could be your problem.

    Might be the key, indeed. I was not aware of this fact. Also, thanks for your advice regarding my design, I'm going to test this immediately !

  • It's because the audio doesn't start loading until it calls the 'play' action and it will begin playing when it has finished loading which could be random. It is better to preload audio before you go to this layout with the preload action, then when preloads are complete go to the layout. At that point the audio should play at the time you want.

  • Many thanks to you two, the problem has been fixed and I've learned some new facts regarding how the audio works in Construct 2. Enjoy the rest of your sunday !

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