Intergrating Facebook Instant Games

Recommended Posts

Hi all,

I'd like to upload my game Instant Games, however I've been having a hard time applying Facebook's code to Phaser; I end up with a black every time.

Let's say I have the following code:

    var game = new Phaser.Game(500, 500, Phaser.AUTO, null, {preload: preload, create: create, update: update});
    var sprite;
    function preload(){
        game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
        game.load.image('sprite', 'img/character.png');
    function create(){
    function update(){

How should I modify it to make it compatible with Instant Games?

I'd really appreciate it if anyone can help me with this as I'm new to Phaser.

Share this post

Link to post
Share on other sites

I checked his tutorials; unfortunately I'm still getting black screens when I upload my game.

I noticed he put the code below inside FBInstant.startGameAsync()

game = new Phaser.Game(gameWidth, gameOptions.gameHeight, Phaser.CANVAS);

If I do the same, the game won't even run anymore.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.