Toby R's Forum Posts

  • AndreasR you're the Cocoon master . Can you confirm that it works? Or you haven't tested this part?

  • Can anyone confirm that restore purchases works for CocoonIO?

    I've managed to set up everything regarding IAP with Cordova IAP for Intel XDK, but struggeling to set up restore purchases with CocoonIO. Not sure if I'm missing something or this feature does not work?

    I tried with Android.

  • Resolution itself is not that important. Ratio is important. If you build a game you want it to look well on ALL possible devices. So you have to do it responsive. I use Scale Outer with screenAdjuster/safeZone and use ViewPort's to set objects on the border of the screen. It fits perfectly any mobile device.

    The same goes for desktop apps. My game I made for AirConsole was also done the same way. I have 16:9 screen, but I saw AirConsole team played my game on very wide screen (don't exactly know the ratio - but was a weird one) and it fit as well.

    Haven't read your tutorial yet , Maybe I'm just repeating what you have written there. Just saw you're talking about resolutions and it's the ratio which is important.

    Regarding resolution it's not really important because if you pick a bit bigger then engine will downscale it anyway. The same goes for small resolutions, engine will upscale it for bigger screens. Just remember to use bigger images for sprites if you pick low rez, so they could scale with good quality.

    I personally pick an average resolution (1200x800) and use images of the 1.5x sprite object size. It scales nicely both ways.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Guys,

    I've planned to make a leaderboard module for MoModth, but I went a step further with my plans and I'm thinking about to make a universal tool for it.

    I know there are Google Play etc. leaderboards that you can use but this is platform specific. When you want to make your own leaderboard dedicated for your game and platform independent then currently you have to make it on your own server right? I mean create (for instance) MySQL database and write a PHP code to cover your API. It's pretty much of work as for one simple feature.

    What I'm thinking about is to make a tool where you would set up your leaderboard on the web page app (something like in Scirra Arcade). I mean here the name of the leaderboard, fields (score, player name etc.), should it be sorted ASC or DESC etc.

    Once you set up everything, you recieve very easy API to use it in your app.

    Examples:

    Send score

    http://topscore.com/api.php?action=add_record&value=48375&username=john&email=john@gmail.com&api_key=@#4#@TgdfGT$#%Tg'$[/code:2kvbolwa]
    This one will save score to the system.
    
    [b]Load leaderboards[/b]
    [code:2kvbolwa]http://topscore.com/api.php?action=get_leaderboard&output=json&api_key=@#4#@TgdfGT$#%Tg'$[/code:2kvbolwa]
    This one will return a C2 JSON dictionary data with your current top scores
    
    Of course this is only some trivial example, but you know what I mean. So the simple steps which you would have to do in order to have your leaderboard working would be:
    
    1. Set you leaderboard on the site
    2. Add one event using AJAX object to save score
    3. Add one even using AJAX and Dictionary to load leaderboard
    
    Then just generate output in your game with Text Object or Sprite Fonts. That's it. But this can be also covered by some C2 code snippet.
    
    I will do it for myself anyway in the simple form. But if you also find it useful then I'll create a whole site with admin panel etc. so you could use it easily as well.
    
    Just let me know what you think.
    
    Cheers!
  • I was considering putting it there as well but since Education section is "For educators around the world who use Construct 2 in classrooms" I figured out that this will be more appropriate section as it answers some common questions.

  • Is there not an official tutorial or any official documentation on this ?.

    It would be a good idea for an official documentation or tutorial to be updated when necessary.

    Manuals have been written very long time ago. Many things changed since then. C2 generates intelxdk.config.additions.xml file with references to XDK plugins. Now it is not recommended to use this file (exported by C2) in order to load XDK modules and instead you should do it manually with XDK plugin manager.

    Many things should be updated in manuals. And some plugins should be updated as well.

    For instance Official IAP doesn't have "consume" action which is one of the most wanted features.

  • I'm using the official IAP plugin

    With this Intel XDK plugin: ( https://github.com/j3k0/cordova-plugin-purchase )

    working perfect

    Can you explain what you mean by "consumables not working" and "problems with restoring purchases"?

    If a player bought something in one of my games and deletes the complete game and/or data, they are able to restore that item perfectly with this event for example

    Thanks for sharing! Never tried this one. Regarding consumables. Official IAP doesn't have "consume" action which is used to buy particular product many times (gold coins for instance).

  • Hi There!

    I'm a fulltime freelancer with over 15 years of international experience as a professional programmer. I'm happy to help with Construct 2/3 projects, C2/3 plugins & behaviors, PHP/MySQL, JavaScript, AirConsole, Unity3D/C# and related (X)HTML, CSS, SQL, ....

    I also work with several great graphic and sound artists, so if you need a complex work done I'm sure we can pick one which will fit your project perfectly.

    Let me humbly brag a bit now of what I'm proud of regarding my C2 adventure.

    • I created the very first C2/C3 preloading tool which allows to make a detailed layout loading screens with progress bar.
    • I created the very first C2/C3 unloader which allows to release textures from memory on demand.
    • I am an author of two e-books in Construct 2 area (regarding mobile development and overall performance).
    • I am currently working on MoMod - first C2/C3 event driven framework which will help Construct developers build apps much faster and switch between platforms, plugins and wrappers without an effort.
    • I completed my own projects for Steam, Android, iOS and AirConsole and over 50 Construct 2 tasks (mostly games) for my customers (full projects, additional project's features, code optimisation, custom plugins and more) leaving every single customer satisfied with what I provided.

    For more details please visit my Neexeen.com

    My Discord server Toby R's plugins

    My plugins: C2 & C3 plugins

    Cheers!

    == EDIT ==

    Some of my recent works (quick portfolio lookup):

  • Have you checked "On Restore purchases failed" condition? It also returns CordovaIAP.ErrorMessage. Maybe there is some problem with the store (settings?), not the implementation.

  • How come you had Cordova IAP C2 plugin before purchasing? Didn't you buy it second time now?

    Anyway...

    1. Add all plugins manually with plugin manager in Intel XDK (together with https://github.com/cranberrygame/cordov ... ayment-iap)

    2. Just before building an app you should remove everything from your additions.xml if you don't use www directory

    3. Paste there the code I included in the post above

    As I said before I am no iOS expert, but this is suggested by Intel XDK to not include modules with additions. xml but with plugin manager.

    If this still won't work for you then I can't help further as I don't even have an iOS device to test, so maybe some iOS developer can give some additional hints.

  • Well actually both mentioned above are practically the same. One is a fork of another.

    Previously I tried without adding any cause it worked in the past, but later I ralized that earlier I wan't using WWW directory, so XDK imported it automatically from additions xml. Also tried with Cranberry library just to add billing request, but again obviously this won't work since lirbrary API is different.

    Anyway it works.

  • I am no iOS expert, but according to recent C2 Cordova export this is the only thing that you should have in your intelxdk.config.additions.xml

    <!-- Change the debuggable preference to true to build a remote CDT debuggable app for -->
    <!-- Crosswalk apps on Android 4.0+ devices and Cordova apps on Android 4.4+ devices. -->
    <preference name="debuggable" value="false" />
    <!-- IMPORTANT: set the debuggable preference to false before you build for the store! -->
    
    <platform name="ios">
        <!-- below requires the splash screen plugin, otherwise ignored -->
        <!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
        <preference name="AutoHideSplashScreen" value="true" />
        <preference name="FadeSplashScreen" value="false"/>
        <preference name="FadeSplashScreenDuration" value="2"/>
        <preference name="ShowSplashScreenSpinner" value="false"/>
    
        <!-- below requires the status bar plugin, otherwise ignored -->
        <!-- docs: https://github.com/apache/cordova-plugin-statusbar -->
        <!-- see http://devgirl.org/2014/07/31/phonegap-developers-guid -->
        <preference name="StatusBarOverlaysWebView" value="false" />
        <preference name="StatusBarBackgroundColor" value="#000000" />
        <preference name="StatusBarStyle" value="lightcontent" />
    </platform>
    [/code:dvgv02gi]
    
    If you don't use [i]www [/i]subdirectory in your Intel XDK project folder then this file gets overriden and you have to set it up everytime before the build. I wrote a tutorial about it [url=http://tobyr.wtfgamesgroup.com/how-to-build-optimized-intel-xdk-crosswalk-app-properly/]http://tobyr.wtfgamesgroup.com/how-to-b ... -properly/[/url]. It's for Android Crosswalk but you will get the point because it's the same thing for iOS just different options.
    
    Also let me know which library do you use in IntelXDK for IAP? Is it this one [url=https://github.com/cranberrygame/cordova-plugin-payment-iap.git]https://github.com/cranberrygame/cordov ... nt-iap.git[/url] or some other?
  • Made several tests. It works for me as well. Sorry for misunderstandings I was simply using the wrong lirbrary.

    Still those points are valid.

    Problems with official IAP plugin:

    1. It does not support consumable products

    2. It has problems with restoring purchases

    3. It does not support Base64-encoded RSA license key provided by the market

    Anyway it works for non consumables if you don't plan to restore purchases.

  • AD plugins have many banner positioning options, but I think I have never seen banner in different position than top or bottom.

    Can you please let me know if you position your banner in any other place than top or bottom? I'm trying to get info if it's common or not to put it somehow different.

    Thanks

  • If it works for Shinkan then it works. I will do some more testing today with two other libraries as well.