Anyone published an app in Facebook instant game?

  • Hello there,

    I got construct 3 and I tried to publish a game on Facebook instant game, and the first problems and concerns came out. (I have experience with the past Facebook SDK and off course, with Construct2)

    First, in order to publish an instant game, you have to upload a zip file with the whole game (exported in html5) on facebook right?

    - I did this, and the game it works. The only problem is that the % load of the game stay to 0 until the game is loaded. I know that Facebook will not accept a bug like that when it's time to publish.

    Did anyone found a solution about this? This is crucial to publish a game.

    Thank you everyone

    TIPS:

    1 - When you export your game as html5, you have to include a file fbapp-config.json in your zip, the file should be like this:

    {

    "instant_games": {

    "orientation": "LANDSCAPE",

    "navigation_menu_version": "NAV_FLOATING"

    }

    }

    just make it with a notepad. If you don't do this, Facebook will not allow you to host the zip in their server. MORE INFO: developers.facebook.com/docs/games/instant-games/bundle-config

  • - I did this, and the game it works. The only problem is that the % load of the game stay to 0 until the game is loaded.

    the % load of game sits at 0 till game loads ... is actually the facebook sdk not loading holding your game loading till it solves its response, you might off not implemented the facebook instant properly, i worked around that issue by manually opening the index.html file and puttin the <import facebook_instant.sdk> thing right in the header(you can find the code for importing the sdk in the facebook help section). it is not your game from my experience so far.

    its normal. don't worry about it. as long as it loads eventually.

  • You can add scripts into index.html

    	<script> 
    	
    		var progress = 0
    			var timer = setInterval(() => {
     if (progress < 80) {
     FBInstant.setLoadingProgress(progress += 2);
     } else {
     clearInterval(timer)
     console.log("remove interval", timer)
     }
     }, 100);
    			
    		</script>
  • Thank You everyone, seems like with the script of potion I now can see the % load on the Facebook instant game. I'm going to update the first post with some tips.

    While I'm making the instant game test, I get 2 possible bugs.

    I have 2 basic question that:

    - Sometime when I open the app, the canvas size in the Iphone is just wrong (like 2 time smaller) this happen randomly sometime. Did anyone know which Full screen mode is better to fit in all devices avoiding this problem?

    - I realized that when you get back the data from Facebook and than used "On loaded data" in order to load the data correctly, the very first action of that event should be the data that you want to load. If for example you have an array and you stored a Json string, then the very first action in that event should be "Load Json from Instant game...". If you move this action in a different order, then the data is not going to be loaded.

    In addition, when you save the Facebook data with the action "Set player data" I found that is not possible to find a trigger to check if the data have been correctly saved. This can be helpful for example if a player while is saving is not connected to internet for a short time (train, for example). Is there any action on Construct3 that I missed out? I can make a token in the array comparing with the old one to see if the data was saved, but at each save I have then to reload the data. I saw that from the SDK there is a way doing it. Is there an option similar to "On loaded data"?

    Thanks

  • Many people here have published many games to FB Instant Games, maybe hundreds(?).

    I have never heard anyone before had any issues with the loading percent like you and potion seems to have.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Many people here have published many games to FB Instant Games, maybe hundreds(?).

    I have never heard anyone before had any issues with the loading percent like you and potion seems to have.

    Well, I will be curious to see hundreds of games on the Instant game. I struggle to make a simple app works well in this platform. This doesn't depend on the logic of the events itself, but because of some bugs.

    The canvas size problem is the biggest problem right now. I'm sure there is a fix that can be applied to the index.html. Is anyone had the same problem as me? Basically, when you open the app, randomly the canvas size sometime is zoomed, or smaller...etc. In order to fix the problem, you have to restart the app until the canvas get well setup.

    Thank you

  • I have never seen that issue. I have never altered anything at all with any file in the exported zipfile.

    You should not need to do that.

    Try scale outer, or letterbox (if you are fine with black bars)

  • I have never seen that issue. I have never altered anything at all with any file in the exported zipfile.

    You should not need to do that.

    Try scale outer, or letterbox (if you are fine with black bars)

    I tried all Full Screen Mode and the problem persist. (I use an Iphone 5s.) I'm going to see if the same happen by simulating the iphone 5s screen on Google Chrome to see if there is any error log on the console.

    Thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)