First Time Trying to Publish an APK. Headaches Ensue.

Discussion and feedback on Construct 2

Post » Sun Mar 13, 2016 1:49 am

If it always starts when you start the gameplay then you probably have something wrong with events. It looks like you trigger it not at start of the game but at start of the gameplay.
ImageImage
B
27
S
16
G
67
Posts: 934
Reputation: 38,072

Post » Sun Mar 13, 2016 1:57 am

BackendFreak wrote:If it always starts when you start the gameplay then you probably have something wrong with events. It looks like you trigger it not at start of the game but at start of the gameplay.


Well in my Game Events sheet, I have the audio set to play the music at the start of the Game Layout. But it doesn't play it at all. It just starts sometime after that, causing the game to lag. After you die, the audio starts at the start of the game layout like it's supposed to. Just not the first time around.
B
24
S
12
G
11
Posts: 260
Reputation: 7,883

Post » Sun Mar 13, 2016 2:21 am

Well if it works fine in the preview then it seems like your mobile struggles with loading the audio.
ImageImage
B
27
S
16
G
67
Posts: 934
Reputation: 38,072

Post » Sun Mar 13, 2016 2:25 am

@Bleenx
It sounds like you've encountered a known audio decoding issue with Chrome/Chromium for Android.

I have a basic game that had 4 audio files (~7 minutes of audio altogether). It was taking about 40 seconds for my game to load when preload audio was enabled. If I didn't preload audio, there would be significant delay on the initial play but was fine after that. Turns out, it has to do with how Chrome/Chromium for Android, starting with Android 4.1+, decodes the audio.

See: https://bugs.chromium.org/p/chromium/is ... ?id=424174

It has apparently been fixed, as of Chrome/Chromium 49, but this will probably take a few more months to funnel down the pipeline to Intel XDK. Crosswalk 19 will implement Chromium 49 in May. Intel XDK is currently using Crosswalk 15 which was released in September. We'll be getting Crosswalk 16 soon which was released in December. If it follows on 3 months from stable, we're possibly looking at late July or August.

https://github.com/crosswalk-project/cr ... ease-dates
B
6
S
2
Posts: 12
Reputation: 426

Post » Sun Mar 13, 2016 2:36 am

BackendFreak wrote:Well if it works fine in the preview then it seems like your mobile struggles with loading the audio.


I'm supposing so but it happens on my friend's LG G3 as well with a better CPU than my poor ol' Moto G.

treeknob wrote:@Bleenx
It sounds like you've encountered a known audio decoding issue with Chrome/Chromium for Android.

I have a basic game that had 4 audio files (~7 minutes of audio altogether). It was taking about 40 seconds for my game to load when preload audio was enabled. If I didn't preload audio, there would be significant delay on the initial play but was fine after that. Turns out, it has to do with how Chrome/Chromium for Android, starting with Android 4.1+, decodes the audio.

See: https://bugs.chromium.org/p/chromium/is ... ?id=424174

It has apparently been fixed, as of Chrome/Chromium 49, but this will probably take a few more months to funnel down the pipeline to Intel XDK. Crosswalk 19 will implement Chromium 49 in May. Intel XDK is currently using Crosswalk 15 which was released in September. We'll be getting Crosswalk 16 soon which was released in December. If it follows on 3 months from stable, we're possibly looking at late July or August.

https://github.com/crosswalk-project/cr ... ease-dates


That's great to hear. I really hope this is something that can solve it. My music file is only 1.8mb I think and loops after a minute and 30 seconds. Once it starts, the game is fine from then on out, and the music loads properly after you start over. It's just that initial starting time that suffers unfortunately :(

Also, if you wanted to stop all audio after someone dies and start it again at the beginning of the layout, would it be better to use a stop all audio or put it on silent? Or something else?
B
24
S
12
G
11
Posts: 260
Reputation: 7,883

Post » Sun Mar 13, 2016 3:24 am

I would use stop all audio. My experience is that toggling silent does not "stop" the audio. It simply mutes it. Thus, if the player is starting anew, you might want to start the music again. If it's simply a mute/unmute button, then I would use a simple silent toggle.
B
6
S
2
Posts: 12
Reputation: 426

Post » Sun Mar 13, 2016 4:08 am

treeknob wrote:I would use stop all audio. My experience is that toggling silent does not "stop" the audio. It simply mutes it. Thus, if the player is starting anew, you might want to start the music again. If it's simply a mute/unmute button, then I would use a simple silent toggle.


Right thanks. I had it set up as Stop All but wasn't sure if that was the best method for it. Thanks for the heads up! If audio stops playing after you minimize the game and then maximize it, is that a bug in my events or something that just happens? I can't reproduce it now but it happened before. Glitch me thinks?
B
24
S
12
G
11
Posts: 260
Reputation: 7,883

Post » Sun Mar 13, 2016 4:28 am

To be honest, I am not sure in this case. It could be a Chrome audio issue. It could be the game. It could be several things.

I was digging through the JavaScript code for the Audio plugin, and I found that the code by the C2 is pretty sharp. It's clean, easy to read, well commented, and rather thorough. Thus, when I land on a problem I assume a problem with my code first, Chrome (or Safari) second, and C2 last. :)
B
6
S
2
Posts: 12
Reputation: 426

Post » Sun Mar 13, 2016 2:31 pm

treeknob wrote:To be honest, I am not sure in this case. It could be a Chrome audio issue. It could be the game. It could be several things.

I was digging through the JavaScript code for the Audio plugin, and I found that the code by the C2 is pretty sharp. It's clean, easy to read, well commented, and rather thorough. Thus, when I land on a problem I assume a problem with my code first, Chrome (or Safari) second, and C2 last. :)


Haha right I usually consider it a problem I did first too. I managed to fix the audio last night it seems. I had the music track set to play on the start of the layout, but I chose it to play by name from Sounds. When I changed it just to Play, it sorted it. Of course, I toggled a few other things in the code here and there and maybe that had to do with it. I have no clue.. all I know is it works and I'm not messing with it again! :D
B
24
S
12
G
11
Posts: 260
Reputation: 7,883

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: mrkaio and 2 guests