tgeorgemihai's Forum Posts

  • Yup, got it to load profile data. Thanks again R0J0hound for explaining the function(){c2_callFunction('c2functionname')}. It really helps

    The runned script after the Api is loaded is:

    "FBInstant.initializeAsync().then(function() {
    	FBInstant.setLoadingProgress(100);
    	// Finished loading. Start the game
    	FBInstant.startGameAsync().then(function() {
    		c2_callFunction('getuserdata');
    	});
    //and after this I can successfully access player's name or photo
    //I still need to understand what is with "contextId" and "contextType". Until now I get "SOLO" (it works as intended)
    });"

    I would like to link somehow FBInstant.setLoadingProgress(progress); to round(loadingprogress * 100).

    Also, not sure if the startGameAsync() should start only after setLoadingProgress() is finished, something like this:

    FBInstant.initializeAsync().then(function() {
    	FBInstant.setLoadingProgress(100).then(function() {
    		// Finished loading. Start the game
    		FBInstant.startGameAsync().then(function() {
    			c2_callFunction('getuserdata');
    		});
    	});
    });
  • R0J0hound Thank you, I just realized (after 5 years) that Construct has jQuery included. I've seen it included in export folder, but didn't think that I can call functions from Browser.ExecJS .

    So I have:

    System - On start of layout
    	Browser - Execute Javascript "$.getScript( 'https://connect.facebook.net/en_US/fbinstant.6.2.js' , function(){c2_callFunction('apiloaded')} );"
    	Or "$.getScript(" & """https://connect.facebook.net/en_US/fbinstant.6.2.js""" & " , function(){c2_callFunction(" & """apiloaded""" & ")} );"
    (both versions work, It's just how you want to work with the quote marks inside strings. The good part is that JavaScript also accepts single ' )
    
    Function - On function "apiloaded"
    	do stuff here
    

    Also, I've realized why I couldn't get the value from variable "playerName". It was because it was inside a function, not global.

    dop2000 I can try, at least to show how to get the game running. The information about Facebook Instant Games is very little, few tutorials ... etc.

  • Hello, I'm trying to include the Facebook Instant Games SDK inside a C2 project.

    I know basic Html/JavaScript and managed to get it work by editing the index.html file using the following code:

    <!-- in head -->
    <script src="https://connect.facebook.net/en_US/fbinstant.6.2.js"></script> 
    
    <!-- in body -->
    <script>
    FBInstant.initializeAsync().then(function() {
    	FBInstant.setLoadingProgress(100);
    	FBInstant.startGameAsync().then(function() {
    		var contextId = FBInstant.context.getID();
    		var contextType = FBInstant.context.getType();
    		var playerName = FBInstant.player.getName();
    		var playerPic = FBInstant.player.getPhoto();
    		var playerId = FBInstant.player.getID();
    
    })
    </script>
    

    How can I call these functions and variables as "playerName" using events ?

    I've noticed that examples use the "window" object when calling functions

    I've tried with:

  • You do not have permission to view this post

  • Have you read the last pages ? This plugin is abandoned, the creator didn't post anything for around 1 year.

    If you want to buy, better use the official store: scirra.com/store

    Also, if you really want to make 3D games, better choose another engine, like Unity or Unreal Engine.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • bilgekaan

    Do you have problems with the converted C3 version from the first post ?

    You can try construct.net/en/make-games/addons/183/ease

  • Except Nintendo Wii U (that can use Net Framework), the only way to export to consoles is Chowdren:

    construct.net/forum/construct-2/general-discussion-17/chowdren-fast-construct-runtim-134395

  • Construct 3 is an Html5 engine only.

    However, it can export wrapped Html5 games directly to platforms:

    • Web (Html5)
    • Andriod .apk (using Cordova)
    • iOS .ipa (using Cordova)
    • Windows, Linux, Mac (using NW.js)
    • Windows 10, Windows Phone 10 and Xbox One (using UWP)
  • Sorry, but I don't see it happen officially too soon, especially with Unity support.

    But there is still a chance with 3rd party plugins: gbatemp.net/threads/brew-js-make-homebrew-apps-with-javascript.504327

    Yup, subscription model is a huge turn off.

    Is not really about the price (around 8$ / month), is about the fact that if you stop paying or something happens with Construct 3, you can simply trow away your project to the garbage.

    This forced away a lot of users and great developers.

    But at the moment, C2 still rocks for my needs.

  • I know of Chowdren from Fusion 2.5 . I've tested it when it was open source and the performance was better then default exporters and it had plugin support for more platforms.

    While more performance is always better, the most important feature is the support for ALL major consoles.

    Is not just a wrapper, it basically translates your game into native (C++)

    And the fact that it even get better performance in HTML5 then the default C2 is something

    I'm curious how it will compare with the new C3 runtime.

    Keep up the good work.

  • To be "that" guy:

    If C2 had "near native" speeds, does this mean C3 is 2~3 faster then native ?

    Jokes aside, is really nice to see how much Construct and HTML5 have grown in the past few years. Good luck and keep growing

  • In my humble opinion: No or not soon

    Why ? Switch already has a lot of developers (big companies and indies). Nintendo released the Web Framework in order to draw more developers to the failing WiiU that lacked 3rd party games.

    Also, even if Nintendo brings the Web Framework to Switch, chances are that C3 will not be supported unless the Web Framework is updated to support WebGL (from what I know, C3 dropped the support for DirectCanvas)

  • This depends:

    Free alternative: If Cocoon Free is good enough for you, then you can stay with C2 + Cocoon . Or you can make your own wrapper service (there are several tutorials on the internet, but it is medium to hard)

    Paid alternative: Instead of any other of the Cocoon subscription plans, I would go with C3. Just comparing the prices, C3 is the clear winner (you also should get better integration for C3 since is the same team and the actual game engine)

    Console: If you plan to release games to other consoles except XBox One ... then you should think about another game engine

    One of the problems is that the people that were making plugs weren't interested in making a profit, and therefore couldn't justify a subscription.

    From what I can see, the addons can be converted quite easily to C3 . The real issue is that they are not longer supported by the author (no new features, no fixes ... etc)

    Its arguable that the free version still allows that, but its much more limited. Its pretty much useless as anything other than a proof of concept.

    I can totally agree with that. With these limits you can't even edit the 3 default games.

    Ashley I know that It had been said a lot of times before, but remove the event limit or put something more acceptable as 200~300 events and block the export at up to 50 events or something.

    When we first released C2, we had people telling us for months we'd obviously failed or had made ourselves irrelevant and were certainly selling less because we chose HTML5 over Flash. Despite a steady stream of such complaints, we stuck to our guns, because we were absolutely sure HTML5 would take over. We act on where we see technology is going, to future-proof the company. I guess not everyone appreciates that.

    Yes, you were right, but now when html5 has become widely spread, a lot of competitors added it, so they have native + html5. Being first on new lands is not always the best , is similar to "early adopters"

    I really liked the post about C3 new engine with the performance and all, but remember that people are paying subscriptions so they expect to make money in return.

    In my opinion, while C3 development is a priority, Scirra Team should also focus on different ads plugins (and IAP) and also support for the big web portals (Nowgrounds, Kongregade, Facebook etc).