WaterlooErik's Recent Forum Activity

  • I think I've managed to find an approach here.

    On application Startup, the intent will be to use the BlackBerry10 Object and call GetExistingPurchases.

    Then, if you want to check purchases at Runtime, there will be a BlackBerry10 method for CheckExistingPurchase (where you pass the ID of the good to check.)

    The missing link is taking the Array returned by GetExistingPurchases and storing it as some usable variable that can be referenced later. Is this where Expressions come in? How would I go about creating a a global, member variable for the BlackBerry10 Object?

    Any advice would be greatly appreciated.

    EDIT: I think I've got it with Expressions. I'll give it a shot here and will follow-up if I have further questions or (ideally) post my solution.

  • Hello all,

    I'm in the process of writing plugins to expose BlackBerry 10 APIs to Construct 2 developers. Everything has gone smoothly until now as the process has been:

    Invoke API.

    Let API do its thing.

    API finishes, trigger Conditions to allow response Actions.

    Now I need to make the returned values accessible to the developer so they can leverage the data in their own logic.

    For example, I am calling an API that returns an array of Purchases (i.e. things the end-user has bought for the application.)

    <pre 100>     /* Action: getExistingPurchases */

         Acts.prototype.getExistingPurchases = function () {

              var _this = this;

              if (typeof blackberry !== 'undefined') {

                  ?blackberry.payment.getExistingPurchases(

                        true,

                        function onSuccess(data) {

                             _this.callbackArgs = data;

                             _this.runtime.trigger(cr.plugins_.blackberry10.prototype.cnds.onGetPurchasesSuccess, _this);

                        },

                        function onFailure(error) {

                             _this.callbackArgs = error;

                             _this.runtime.trigger(cr.plugins_.blackberry10.prototype.cnds.onGetPurchasesFailure, _this);

                        }

                  ?);

              }

         };</pre>On success (or failure) the functions trigger a Condition to allow certain actions to take place. But at that point, it seems to me that data (or _this.callbackArgs) is simply lost. Most of the time the developer will want to loop through the results on their own and take actions (i.e. ensuring a purchased level is unlocked, etc.) but I'm just not sure how to make that accessible to them.

    Does anyone happen to have any insight here? If I can clarify at all, please let me know.

    I just don't see how to bridge the gap between a developer needing to use the data, and having the data in a callback function of my plugin. I feel Expressions may be involved here but haven't found a proper path forward.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello all, apologies for the radio silence. I've been working away on a BlackBerry 10 plugin for Construct 2 but was held up due to some larger transitions in our BlackBerry WebWorks platform. Primarily, we're shifting to a Cordova-based tooling system for which I need to wait for a Cordova 3.0 release before being able to implement these plugins.

    Now that Cordova is there though, let's do a quick status update.

    BlackBerry 10 Plugin for Construct 2:

    BlackBerry Messenger

    • Register with the platform (required before APIs can be accessed.)
    • Invite BBM contacts to download the application.
    • Set the personal message of the user to a custom string (i.e. "I'm playing an awesome Construct 2 game!")

    In-App Payments

    • Purchase a digital good.
    • Get existing purchases (in progress.)
    • Get price of digital good (in progress.)

    Getting existing purchases will allow you to ensure you can keep a record of what the user has already purchased (level packs, etc.) without needing to rely on storing this information in your app itself.

    Getting the price of a digital good will be handy if you want to display this information within your application (before the user clicks through to buy something.)

    You can find the remaining possible Payment APIs documented here:

    developer.blackberry.com/html5/apis/blackberry.payment.html

    I'm curious whether there are any important APIs beyond what is planned that you would want. If so, can you please just provide a brief use-case for the functionality?

    I'm aiming to finish this off this week and have a pull request into Github where there will be a CAPX Hello World project along with the plugin that shows basic usage.

    If there's any feedback in the meantime, please let me know!

  • Just gave this a go:

    • Music played just fine and looped.
    • Screen contents were centered and sized nicely.
    • Main menu navigation was nice and smooth.
    • Controls and in-game functionality / performance / etc. were all just fine as well.

    In short, I don't have any concerns based on what I saw. I can post some screenshots as well or, if you prefer, feel free to reach out via eoroszrn@blackberry.com and we can discuss some more as well.

    Cheers!

    Joannesalfa: I'm working to get it expedited out ASAP, appreciate you hanging in there :-)

  • Hi there,

    In my sample application I have the version in two places.

    1) In the main Construct 2 screen, under the Projects panel, when you select your root project, there is a field for Version under the Properties panel. I have mine set to: 1.0.0.0

    2) During export, on the BlackBerry 10 Options page (where the WebWorks install path is supplied), there is a version field which I set to 1.0.0.1.

    The version in (2) is the one that I am incrementing (i.e. 1.0.0.2, 1.0.0.3, 1.0.1.0, etc.)

    Does this match what you're doing in your project?

  • franzsilva: The current simulator has a known issue with WebGL that should be fixed in the next release. For the time being, if you're testing with the simulator, try changing from WebGL to Canvas2D (regular 2D context) mode before packaging.

    If you would like me to try your application out on a physical device (with WebGL mode) feel free to fire me an email (eoros@blackberry.com) and I'd be happy to help!

  • wrekr: We actually don't have an official API for advertising in BlackBerry 10's WebWorks SDK just yet. I have written a community Ad SDK though based on the very same web service:

    github.com/blackberry/BB10-WebWorks-Community-Samples/tree/master/advertising

    Following BBM and Payment, I could definitely look at integrating that as well, but primarily I would like to stick to the official APIs where possible.

  • Just wanted to share this in case some hadn't seen it yet:

    scirra.com/construct2/releases/r127

    <img src="smileys/smiley4.gif" border="0" align="middle" />

  • For those that haven't seen it yet, I'm happy to share this bit of good news:

    scirra.com/construct2/releases/r127

    I appreciate the feedback on plugins all. I'm buckling down on a BBM plugin first as our Payment API currently has a bug preventing callbacks from firing. I'll make those two priority though and will move towards additional plugins following that.

    Regarding scoreboard and achievements, the BlackBerry 10 platform does have Scoreloop integration available which would be the best way to achieve this. The one drawback is that these APIs are currently missing from the WebWorks platform. Our development teams have Scoreloop on the roadmap for WebWorks, I'm not sure exactly when it will land just yet though.

    All in all, today is a good day :-)

  • Cheers all. Just a quick update: we're exploring what it would take to integrate BB10 exporting directly into the IDE, which is a fantastic step forward in simplifying the process for C2 developers.

    I've also being playing with the plugin SDK, though it relies on the exporter, will aim to have some options available for initial platform functionality.

    It would be great to hear from this community as to what is important to you. Currently I am targeting Payment and BlackBerry Messenger (specifically sharing your application via BBM contacts as that is one of the best ways to get visibility.) If there are any specific BB10 APIs you'd like to see integrated, please let me know and I'll use the feedback as best as I can regarding priority.

  • ahmadasad009: The licenses open up more functionality within the Construct 2 tools to export to a wider variety of native platforms (among other features.) The free license of Construct 2 allows exporting to HTML5, which is all that's really needed for the BlackBerry 10 platform. All you would need on top of that is a BlackBerry World vendor account to manage your submissions; you can sign up to be a vendor here:

    appworld.blackberry.com/isvportal

    Note that signing up, publishing applications, and downloading tools are all free. The only thing is, if you are selling applications, there is a 70:30 revenue split in the developer's favour (same as other app stores.) Other than that, there is no actual "cost".

    Joannesalfa: A BlackBerry WebWorks plugin is definitely on my radar. We've addressed the majority of critical issues that I'm aware of and we have a porting guide ready to be published to our website any day now. Should appear here when ready:

    developer.blackberry.com/html5/documentation/using_javascript_libraries_frameworks_in_webworks.html

    Now that we have the basic building blocks in place, I'm going to dive into the plugin SDK to see what I can do there. ArcadEd has been awesome in putting together a GUI tool for much of the porting process. I'm not sure if he's posted it on here yet but I would ask him about it for sure.

    Wink: An unofficial porting guide can be found in these posts:

    1) scirra.com/forum/forum_posts.asp

    2) scirra.com/forum/forum_posts.asp

    3) scirra.com/forum/forum_posts.asp

    In (1), the icon element is described as desired, consider it required and please be sure to add it during your porting process.

    The official guide, once posted, will very closely resemble the information in those three posts.

    As for emulators, we have the Ripple emulator available here:

    developer.blackberry.com/html5/documentation/getting_started_with_ripple_1866966_11.html

    And a VMWare simulator available here:

    developer.blackberry.com/html5/documentation/using_the_bb10_simulator_2008466_11.html

    The simulator currently has some WebGL driver issues which should be fixed in the next update, so I would recommend sticking to Ripple for the time being. If anyone ever wants their application tested on a physical device, feel free to send it to me at eorosspm@blackberry.com and I'll provide what feedback I can.

    Don't hesitate to reach out with any questions (or if I've missed anything.)

  • Soybean: Are you willing to share the CAPX file? If so, can you fire it to me at eorossbk@blackberry.com?

    I would think that Construct 2 is using standard touch listeners and I'm convinced I've seen touch events working in the past. I wouldn't mind doing a test on this end.

WaterlooErik's avatar

WaterlooErik

Member since 15 Nov, 2012

None one is following WaterlooErik yet!

Connect with WaterlooErik

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies