Rable's Forum Posts

  • Thanks again for the help. I already reduced the memory usage by splitting one layout into two (was using container layout already).

    Now I've got a question about music.

    For some reason, on an iPad, music only starts when touching the screen once the layout has started. This cause massive music problems in Healer Quest, and it happens when exported both with XDK and Phonegap Build. FYI there is no such music problems on android, and I think it's correct on iPhones, too (problem iPad only AFAIK, experienced on iPad Air 2 and iPad Mini 2).

    To counter this, the only solution I found was to add the music into the sound folder, and here is my question : Does making this increases the memory usage even if the music is not played?

    Another question : Is there any "clean" way to play music correctly on the iPad?

    Thanks!

  • i think that "container layout" is not good idea ...

    Why not? Could you please develop your thoughts?

  • Thanks for the info about memory use. Very useful!

    : I don't really know about what Phonegap Build is using. Do you mean XDK should be better? I will keep your tips in mind for my next game but here I need to find efficient ways to reduce memory usage on a finished game.

    I have another new element to share : I'm using a "container" layout in my game that contains most graphical elemens of the game in it, and is never played.

    The idea is that, as I have only one layout for every fight of the game, put all the enemies' images on the "game" layout will make it quite heavy. So I have them on an unused layout and only create the images I need at the beginning of each level. Is there any drawback to this method that I'm unaware of?

    I just moved one of my images from my game layout to the container layout, and the "memory use" moved up from 298 Mb to 300 Mb, so I guess this memory use is for the "container" layout? But as this layout is never played, the memory usage displayed in the editor is probably not relevant, isn't it?

    If I'm guessing right, it's the number inside the debugger which gives a clear indication of memory use (images only), which in the case of Healer Quest can go up to 120 Mb.

    Another question : I have many big, invisible, flat-colored squares that I use as collision boxes in the game. Their weight is about 200 bytes each in my image folder. But do they use big part of the memory too?

    Is partial transparency (i.e. 20% opacity) taking more memory than 0% or 100% transparency images?

    At least I now see what I can do to reduce memory usage, so thanks a lot for all the very useful advices. And splitting my big layout into 2 parts (game+map) already seems to limit memory usage in game to around 90-100 Mb maximum.

  • Oh, I actually forgot something important! This test was done on my PC, using the uncompressed images, but each time I export Healer Quest, I replace all the images with their compressed version in the image folder. I think the image folder's size drops from 50+ Mb to 16 Mb! So the actual memory usage is probably less than what is displayed in the editor and debug mode. So it should be still better than what I told in my previous post.

    Still, the game crashes a lot !

    Thanks Ashley, I remember reading this post a few month ago, but I'll read it again.

    EDIT : Have read it and it contains the info I was looking for :

    "In Construct 2, images are loaded layout-by-layout. This means when a layout starts, every object on the layout is loaded in to memory immediately. This is to avoid mid-game pauses as textures are loaded on the fly. When the layout ends, it will free all the images in memory not used by the next layout, and load any new images the next layout uses."

    So I'll definitely try to put my map on a separate layout if possible.

  • TiAm I'm unaware of what a footprint is (sorry). But I guess it's what Ashley is asking for in his reply?

    Ashley The C2 editor tells me "Memory use : 298.2 mb"

    When playing the game in Debug mode, memory usage (images) goes sometimes higher than 100Mb. Sometimes even higher than 120Mb if the player wanders on the map...

    From what I experienced, on an iPad mini 2, the game seems to crash as soon as the memory use is above 100Mb, which is quite problematic.

    What I noticed is that even if I delete the objects, they are not erased from memory. Actually the game only refreshes memory when changing layout.

    Is there any way to refresh memory other than changing layout?

    Otherwise, separating the map on a different layout seem to be mandatory.

    Any other tip?

    Thanks a lot!

  • Hi,

    My mobile game runs nicely on Android (not many crashes), but on iOS, especially when exported with Phonegap Build, I have too many crashes! Even on an iPad Mini 2. Is there any precise tips to try to reduce the number of crashes? Should I delete as many images as possible, or should I rather try to deactivate as many event groups as possible, or something else?

    I found this thread on the topic, with a reply by Ashley :

    Crashes (as in the app exits) are usually caused by buggy graphics drivers, or running out of memory. In rare cases it may be a browser bug, but the first two causes are far more likely. There's not much you can do about buggy drivers; most mobile platforms don't allow updates outside of updating the entire OS, which is subject to the carrier/manufacturer approving the update.

    If there's a bug in the C2 engine then if the JS code goes wrong it probably won't crash the app. It will probably freeze instead, since the browser engine catches the JS error, halts the script, and then continues running the page. That's useful in web pages but since the C2 engine is all JS then the game logic halts freezing the game then the last frame remains on-screen. If that happens then ideally you'd be able to reproduce it and report it as a bug to us so we can fix it.

    My problem is probably memory, as my game runs mostly on only one layout.

    Thanks!

  • Yup, I've been able to make it work after a lot of retries/errors. In the root folder, I added the following icons (with right sizes)

    icon-16.png

    icon-32.png

    icon-57.png

    icon-76.png

    icon-114.png

    icon-120.png

    icon-128.png

    icon-152.png

    icon-256.png

    icon.png (size 57x57 px)

    and in the XML file, I pasted the following code :

    <icon src="icon.png" gap:platform="ios" width="57" height="57" />

    <icon src="icon-128.png" width="128" height="128" />

    <icon src="icon-256.png" width="256" height="256" gap:role="default" />

    <icon src="icon-57.png" gap:platform="ios" width="57" height="57" />

    <icon src="icon-120.png" gap:platform="ios" width="120" height="120" />

    <icon src="icon-152.png" gap:platform="ios" width="152" height="152" />

    <icon src="icon-114.png" gap:platform="ios" width="114" height="114" />

    <icon src="icon-76.png" gap:platform="ios" width="76" height="76" />

    I guess everything is not mandatory, but at least, it works for me!

    I hope it will work for you too!

  • Thanks guys, I'll try XDK one more time.

    volkiller730 What's weird is that I tried XDK (iOS export) + Cranberry game plugin, got approved (the true approval), released the game in Belgium only for a few hours to test if IAP were working... And they weren't. I got "Store Listing Failed" every time I requested it. And the code was exactly the same than on Android (which was working fine).

    It seems that by now XDK export supports Construct2 IAP plugin too, so that's something else to try.

    Other random problems I had with XDK export to iOS are landscape mode not locking (I think there is a plugin for that) and music launching only after a click on iPad Air 2 (but I guess putting all music inside the sound folder should do the trick).

  • I have the same kind of experience as you. Healer Quest works perfectly on Android (IAP + Leaderboards and achievements), but I'm still litterally STRUGGLING with iOS export. I first tried using Intel XDK (which I'm using for Android) but despite I had approval from Apple, the IAP weren't working.

    Then I tried exporting with Phonegap Build, but now my submission was refused (2 times) because of Game Center... And I still wasn't able to test the IAP using Phonegap Build. With 1-2 weeks between each submission, it takes a lot of time, and I've been unable to use sandbox mode successfully up to now to test IAP without receiving official approval.

    From my experience, it's impossible to get help on export to iOS problems on this forum. Most of my post on the subject either have received no reply, or unuseful onces. My guess is that most people simply don't know how to do it. I also haven't been able to find a recent tutorial about how to export to iOS with IAP working, while they are dozen of Android tutorials + the very active Intel XDK Crosswalk experiences thread. Guys from Intel are always ready to help, which makes exporting with XDK much easier.

    I'll tell you when my game will be successfully exported to iOS, and will try to explain how I managed to do it (if it happens ^^').

    Good luck !

  • It is definitely possible to get paid from Google Play when outside of the US.

    Just check your bank and tax infos are correctly inserted in Google Wallet.

    Also, payments will only be made when the amout is more than a certain threshold ($1 I guess) and once per month (around the second day of the month).

  • Hi everyone,

    I submitted Healer Quest for approval by Apple (iOS App Store), and I’ve been refused for the following reason :

    « We noticed that Game Center has been enabled for your app but there are no Game Center features within the app.

    Specifically, the app has GC enabled and leaderboards and achievements have been submitted for review. However, no GC achievements or leaderboards were found in the app. »

    Well… I can swear there IS Game Center in my code. Actually it’s the exact same events that I am using with CranberryGames « Phonegap Game » on the Android version, where achievements and leaderboards are working perfectly. I’ve just replaced the PhonegapGame plugin with C2’s GameCenter equivalent, i.e. :

    « Authenticate user » at the start of the first layout.

    « report achievement "achievementID"» when the player unlocks an achievement.

    « Submit score N to leaderboard "leaderboardID" »

    « Show Leaderboard "leaderboardID" » on the title screen to check the different leaderboards

    « request Achievements » to show the list of achievements unlocked by the player on the title screen.

    I’m using Phonegap Build to export to iOS platform, while the Android version is exported with Intel XDK.

    Do I need to use other conditions / actions in order to make GC to work?

    Is there something I’m missing ?

    Any difference with the use of PhonegapGame plugin for Android / Intel XDK ?

    Should the IDs be types within " " ?

    Thanks a lot for any idea about what could be wrong!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just found this if it could help. It seems you can use C2 IAP within XDK now (didn't try though) :

    https://www.scirra.com/tutorials/1376/f ... iap-plugin

  • Thanks, I'll try that. But what will happen if there is no ad preloaded? Will the banner be displayed without any ads?

    I'll add a 2 second delay before the banner appears, or is it another way?

    After a second thought I don't think this is the problem, because in another game mode, I have

    on start on layout : preload banner ad

    (at the end of level) : show banner ad (along with other events that ARE performed, in the same event)

    ...and the banner ad is not displayed either.

    mudmask : yup, I read this one before posting, but it didn't help. In my case, I think everything should work, and it doesn't, so I tried to describe what I did as clearly as possible to see if someone can spot an error.

  • Hi,

    Up to now, AdMobs ads fail to appear in my Google Play (exported with Intel XDK) game. The problem is very simple : nothing appears.

    I added the C2 AdMob plugin.

    I created an account on app.admob.com

    I entered the ID for banner ads and interstitial ads, both are in the following style : ca-app-pub-0123456789012345/0123456789 (is this the correct ID that should be entered? I entered th whole thing with the "/")

    I didn't add the publisher ID anywhere because C2 isn't asking for it as far as I know

    I put overlap to "yes" and test to "true"

    I added the Admob plugin in the third party plugins in XDK as referenced in the manual : https://www.scirra.com/manual/184/admob

    My code is as follow :

    At start of layout : preload banner ad

    On banner ad received : Show banner ad at position bottom-center size Smart-banner

    I did all this and still nothing appears in the game (which is still in beta test on google play)

    Any idea what I'm doing wrong?

    Thanks!

  • I think I should first know the email which is synchronized with the device on which the game will be tested, which is more than probably not the email given on the websites.

    Then people should first join a google+ group in order to be able to beta test the game.

    I don't think game journalists will apreciate this. Their time is precious. From what I've seen, giving them a link to the APK file seems to be what everyone do.