Will5 Posted May 6, 2018 Share Posted May 6, 2018 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(){ game.add.sprite(0,0,'sprite'); } 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. Link to comment Share on other sites More sharing options...
end3r Posted May 7, 2018 Share Posted May 7, 2018 Not sure if this will help, but you could check Emanuele's tutorials on the topic: http://www.emanueleferonato.com/category/facebook/ Link to comment Share on other sites More sharing options...
Will5 Posted May 7, 2018 Author Share Posted May 7, 2018 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. Link to comment Share on other sites More sharing options...
Recommended Posts