labithiotis's Forum Posts

  • Updated the first post as I got this working, have listed all the things I did to get it working.

  • R123.2 as done it <img src="smileys/smiley20.gif" border="0" align="middle" /> I now have popups with correct IAP information from apples store sandbox but with the tester account I am not getting on purchase complete triggers. Will investigate further before bugging you with it.

    Great job and thanks for adding this in so quickly, this is one GAINT step forward for making IAP work in C2 & CocoonJS.

    I can see the finish line! Woo

  • Ashley Great job! <img src="smileys/smiley20.gif" border="0" align="middle" />

  • So below is a collection of nice to have suggestions I have been jotting down. What you guys think, got any others to add. Maybe we could could help Scirra if we prioritise them, I have loosely placed them in order of what I think would be higher priority.

    1. Have a system expression to convert a number into a comma/dot separated string ( 2000 -> 20,000) , with maybe settings for zero padding (i.e. 3)
    2. A debug option, with debug enable it applies a FPS counter to the top automatically (similar to CocoonJS) and say tapping this provide additionally information like (just ideas of the top of my head) : * Total Objects on screen * Total Objects in play * Average FPS since start * Numbers of Trigger listeners * Peak events called per tick * Custom Variables (i.e. states, scores, level) * Enable Hit boxes outline (for physics or for touch/click) * Enable Objects ID (attached/pinned to object)
    3. Have Wait X ticks rather than Wait X seconds, as I use quite a few wait 0.01 seconds to allow an array for example to be initialised with data, if I don?t use a wait seconds it treats it as a blank array. So would be nice to have an option for tick rather than seconds special if it?s on a device that has fps drops of 15-20 (i.e. mobile) as sometimes 0.01 second isn?t enough.
    4. Option to set on FadeIn Behaviour the amount it fades in to or out to (set the opacity amount)
    5. When scaling an object in layout editor ability to constrain the Width and Height when editing the numbers in object properties window (I know you can hold down shift, but I want to use whole numbers when scaling)
    6. On export if files included in the files folder are not made lower case and that any folder structures are kept. For example I could put my font file in the files folder to be automatically included in export with correct case.
    7. Set array data in object properties window (similar to unity3d), rather than having 20 actions to set each value on start of layout.
    8. Refresh/update images (similar to Adobes Flash image update) rather than converting to project and updating images in each of the folders which is very fiddly.
    9. Move global variables between sheets.
    10. When you search an sheet it highlights the term and pressing a shortcut (i.e. F4) navigates to next term.
    11. Ability to disable and includes like events & actions. (currently I can just delete and re-add it)
    12. Highlight/indicated unused variables/functions (very low priority but nice for cleaning up scripts)
  • On windows 8 it says it's crashing at this point :

     Line 351:
         cr.arrayFindRemove = function (arr, item)
         {
              var index = arr.indexOf(item);
              if (index !== -1)
                   cr.arrayRemove(arr, index);
         };
    
  • "the promotion is only open to U.S. residents"

    Shame for us brits <img src="smileys/smiley13.gif" border="0" align="middle" /> Maybe they'll offer a UK deal soon.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Getting this error too but I can't isolated it to specific events.

    More console information:

    Uncaught TypeError: Object #<Object> has no method 'indexOf' common_prelude.js:461
    cr.arrayFindRemove common_prelude.js:461
    Runtime.ClearDeathRow preview.js:1749
    Runtime.logic preview.js:1422
    Runtime.tick preview.js:1280
    Runtime.setSuspended preview.js:615
    window.cr_setSuspended preview.js:3272
    onVisibilityChanged
    

    If the hotfix tomorrow doesn't resolve it I will try to strip down current capx to isolate cause.

  • Not sure if this is exactly what your looking for but its full screen with an object positioned in the centre at all times. This works for all mobile devices from iPhone3/4/5, Sony's, HTC's, iPad/iPad Mini and even iPad retina. Also retina doesn't look too bad up-scaled.

    FullScreenResponisveLayout

  • You might be getting an error which is freezing the app, have you got any errors in the debug (accessed by tapping the fps in the top corner). Also my sisters has problems with cocoonjs cache, she had to clear it every couple of uses, she was just getting black screen too. (she's on a Sony Experia S)

  • Pre-requisites

    IAP Checklist

    Also I have now got a CocoonJS premium account which gave me compile options for Cocoonjs store and added the IAP to cocoonjs store.

    Link to .capx file (required!):

    https://dl.dropbox.com/u/2175584/Construct2Examples/IAPTest.capx

    Steps to reproduce:

    1. Launch compiled project from ludei (cocoonJS) in xcode

    2. Observer console log

    3. Comment out the on start (crashes app)

    4. Load again

    5. Press the buy button

    6. Observer console log

    Observed result:

    Console log :

    At Start:

    JavaScript Exception ( Tag: 'timer'): Exception calling 'IDTK_SRV_STORE' extension with
    'isFeaturePurchased' funtionName: IllegalStateException: Trying to use a non started service
    at virtual bool com::ideateca::service::store::AbstractStoreService::isFeaturePurchased(const
    string &) const:519

    On Touch:

    JavaScript Exception ( Tag: 'touchstart'): Exception calling 'IDTK_SRV_STORE' extension
    with 'isFeaturePurchased' funtionName: IllegalStateException: Trying to use a non started
    service at virtual bool
    com::ideateca::service::store::AbstractStoreService::isFeaturePurchased(const string &) const:519

    Expected result:

    Am I getting this error because CocoonJS.Store.start(); isn't being called in c2runtime.js. I have tried manually executing this function from C2 using callJs.

    Browsers affected:

    Chrome: no

    Firefox: no

    Internet Explorer: no

    CocoonJS: yes

    Operating system & service pack:

    Windows 8

    Construct 2 version:

    r122

    Notes:

    Looking at Ludei's example IAP they have this code in their HTML:

     
    isStoreAvailable = false;
    products = new Array();
    purchases = new Array();
    
         if (CocoonJS.Store.nativeExtensionObjectAvailable && CocoonJS.Store.canPurchase())
         {
              isStoreAvailable = true;
    
              CocoonJS.Store.onProductsFetchStarted.addEventListener(onProductsFetchStarted);
              CocoonJS.Store.onProductsFetchFailed.addEventListener(onProductsFetchFailed);
              CocoonJS.Store.onProductsFetchCompleted.addEventListener(onProductsFetchCompleted);
    
              CocoonJS.Store.onRestorePurchasesStarted.addEventListener(onRestorePurchasesStarted);
              CocoonJS.Store.onRestorePurchasesCompleted.addEventListener(onRestorePurchasesCompleted);
              CocoonJS.Store.onRestorePurchasesFailed.addEventListener(onRestorePurchasesFailed);
    
              CocoonJS.Store.onProductPurchaseStarted.addEventListener(onProductPurchaseStarted);
              CocoonJS.Store.onProductPurchaseFailed.addEventListener(onProductPurchaseFailed);
              CocoonJS.Store.onProductPurchaseCompleted.addEventListener(onProductPurchaseCompleted);
    
              CocoonJS.Store.start();
    
              refreshProducts();
              refreshPurchases();
    
              CocoonJS.Ad.preloadBanner();
              CocoonJS.Ad.setBannerLayout(CocoonJS.Ad.BannerLayout.BOTTOM_CENTER);
         }
    

    Does that need to be somewhere in c2runtime.js as no html file is made for cocoonjs?

  • I'm currently building a app with 640x960 for iPhone. I use scale and have a background with dimension of 2kx2k the game looks perfect on iPhone3 (320x480), iPhone4, iphone5, ipad mini and ipad retina (1536x2048). Also works for new Htc one and Sony Experia S. I haven't had to change anything for each of those devices and the assets look native! Had slight issue finding Center point of screen but after making a variable to work out scaleratio and deviding windowwidth by ratio and 2 I got it fixed.

  • WOW that was actually quite fun, at first I didn't get it. But then released you had to keep moving the speakers, as they fade out and disappear. Got very epic towards the middle.

    Excellent concept :)

  • In the future I would advise you to use Chrome Console plugin you can add events in your code flow to make sure it's being called, also debug variables which is SOOOOO helpful!

  • Yes you need a mac, but you can do it without mac if you use a virtual machine by using VMware and Mac ISO

  • Can I check something, when your making a release key store does the YOUR IDENTITY need to be something google as generated for you or can it be something completely random/related to you. Also the other information like organisation etc.. Is that very important or not?