Bleenx's Recent Forum Activity

  • Another questions, why did you save it as String to convert it later back to int? Just save & fetch it as int

    Regards

    Andy

    Because I'm not the smartest person haha, and I was following a tutorial that did it that way. I've since deleted the code and am looking at tutorials on the site to help me with it. If I have more problems, I'll post again later. Thanks for the tip!

  • im okay now.. finally found the problem..,

    So what was the fix to the problem? I can't get local storage to work on Android.

  • Because the last post was on the 6th and it's relatively new and I'm having a problem, I thought I'd ask here.

    My game on mobile saves the high score as long as I don't close the app. If I open the app again, the high score is reset to 0.

    I have the system setting the localHighScore variable to the score and setting the item to a str(localHighScore) when the game ends. When the game starts, I have a preloader set the localHighScore to int(LocalStorage.ItemValue).

    Does that make sense? If I need to show a screen grab or something I can try to do that.

  • 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!

  • 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?

  • 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.

    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 <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • > It's imported into the Music folder and set to play on the start of the game layout.

    >

    If it's set like that it should work fine. But you might want to try with other device as well. Audio is kinda hard topic with HTML5. On my SGS4 I always have a 0.5s sound delay no matter if it's preloaded or not. It's just a mobile issue and nothing really can be done.

    Thanks for letting me know. After messing with it and taking it out of preload, the music still doesn't come on until you're playing the game. There's always something that has to be a problem it seems Gotta be a solution to have the music start when it's supposed to.

  • Do you have your music file imported as a music or as a sound? It sounds to me like you have it as not preloaded sound and C2 starts loading it after you touch the trigger. Do not try to preload 1MB of music. It will take some time. So put it into music folder of C2 and It will be streamed on the fly.

    Ohh I see. So when I go back into c2, just take the music out of the preloader event altogether? Does it stream the music from the folder automatically or do I need to set up some special event? It's imported into the Music folder and set to play on the start of the game layout.

  • As glerikud said, just check "Signed" checkbox under Intel XDK build settings. Intel XDK will create a keystore for you and sign the APKs. Nothing else you have to do. Once you download signed APKs they are ready to be published or installed on your mobile. Be aware that in order to test IAP you have to first upload APK to GDC and install your app from there.

    I know all this might be confusing at start but it's really simple once you know what to do.

    Aaaah you guys have been a great help let me tell you! It worked finally after two weeks! Amazing. My only bug problems now seem to be the audio. The music doesn't start playing after the first touch event and comes in late during gameplay. It's only a 1mb audio loop. And if you minimize the game, the sound doesn't come back on if you restore the app. If you can offer suggestions on that, I might jump through the monitor and kiss ya right on the mouth

  • You should let IntelXDK sign the APKs automatically for you. If you must use your own keystore then it's easier to send it to Intel and ask them to assign it to your account. You will get rid of most of the problems you now have to solve manually at the moment.

    If you want to run APK on your mobile which comes directly from IntelXDK then you must allow installations from unknown sources. Otherwise you have to send it to Google first and test it as Alpha/Beta tester.

    Thanks for the help. How do I let IntexXDK sign the APKs automatically? This is the first time I've really tried doing all this. I only tried to make my own keystore because I thought I had to. I don't even have a Google Dev account yet and just wanted to test my games on mobile to see how they played before I ever tried releasing them on the Play Store.

    I have unknown sources checked, but the Parse Error is what threw me off.

  • Hey everyone,

    So I finished creating a game in c2, built it using XDK and got x86 and arm7 .apk files to test. Problem.... I can't test them on my phone (Moto G). I've gone through the process of using the JDK and Android SDK to do a keystore and jarsign and zipalign. When I import the apks onto my phone, all I get is a Parse Error. I can't test them at all. I have developer options enabled so I can install from unknown sources.

    It's taken me two weeks just to get this far in the build process, and now I'm stumped again. Does anyone here have any experience with this and could give me some helpful advice on getting past the craziness so I can test the apks on my phone?

    Help would be so appreciated you don't even know.

    Thanks.

    P.S. I also get this message in the cmd when doing the jarsign "No -tsa or -tsacert is provided and this jar is without a timestamp. Users may not be able to validate this jar after the signer certificate's expiration date (2043-07-29) or after any future revocation date."

Bleenx's avatar

Bleenx

Member since 27 Feb, 2016

None one is following Bleenx yet!

Trophy Case

  • 8-Year Club

Progress

8/44
How to earn trophies