Loading Percentage Stuck close to 100% on Facebook Instant Games build

Hi everyone,

I’ve been following along with the Defold platformer tutorial, so I thought I’d try to get it to run as a Facebook Instant Game. I added the dependancy to the GitHub master zip, configured the app on Facebook Dashboard, and copy-pasted my App ID into the facebook section of game.project. Then I bundled the project as an HTML5 game, and added the reference to the Facebook Instant Games script in the resulting index.html. However, when I upload the game to Facebook and try to run it on my phone through Facebook Messenger, the loading gets stuck around 80-90%. Has anyone else encountered this?

Thanks,

  • Mark G

Do you have code like this in your game?

		fbinstant.initialize(function(self, success)
			fbinstant.start_game(function(self, success)
				...
			end)
		end)

The Facebook section in the game.project is for a different Facebook API than Instant Games.

No, I don’t. Where would that code go? Do I just need to make a gameobject with the script component in one of the levels?

Put it in your main entrypoint and begin your game through it

fbinstant.initialize(function(self, success)
			fbinstant.start_game(function(self, success)
				game_start()
			end)
		end)

Check the XOXO example included with the Facebook Instant Games extension.

Okay, thanks. I’ll take a look