Hi guys,
I've successfully added Scrappy Cat, a game I've previously released on web and mobile, to Facebook Instant Games. This basic integration took about an hour, but hopefully with these instructions a lot less:
1. Add this code to your game, at the point you want the game to show:
pcall(function() FBInstant=require "FBInstant" end)
if FBInstant then
FBInstant.startGameAsync(function()
print("Loading screen removed")
end)
else
print("FBInstant not loaded")
end |
2. Export the game to HTML5 with the "Facebook Instant Game" checkbox ticked:
3. Go to
https://developers.facebook.com/?advanced_app_create=true. You may have to open a Facebook dev account if you haven't already.
4. On the "Add a product", choose "Instant Games / Set up"
5. Fill in the details about the game under "Instant Games / Details". The images generated by Gideros should help this process.
6. Go to "Web Hosting", zip up the contents of "package" from your exported project. Once uploaded click the star to "Push to production".
7. Go to "App Center / Details" and click "Web Preview" to test the game. To test on mobile, open the Facebook Messenger app on mobile (with your developer account) and search for your game name.
8. Once you are happy with your game, and make sure ALL monetisation is in, go to "App Review" to submit the game to Facebook.
Hope this guide helps to get started on Facebook Instant Games. Look forward to seeing your instant creations!
Cheers,
Niclas
Comments
(The require, etc will otherwise crash on other platforms and it means you can have a common source code)
Then just check for FBInstant before calling any api commands for it.
Edit: You have updated the first post to show this code instead.
Likes: pie, JuanZambrano, jimlev
https://deluxepixel.com
Likes: pie
https://deluxepixel.com
Likes: antix
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
I've noticed that 480p projects look sharp enough even on 1080p smartphones, without adding @2x/@4x sprites
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Likes: antix, totebo, Apollo14
https://deluxepixel.com
Likes: antix
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Likes: jimlev
Thanks for sharing your story, it is very usefull (despite the fact that many changes have affected the process from that time).
Could you give us some news of your experiments ? Was it a positive experience for you ? Did you achieve to push your game through all the facebook evaluation/check/updates ? any advices for someone who try to take the same route today ?
SinisterSoft: “ I don't create classes that much - classes are good for making things simpler but imho for frame rate they are also death by a thousand cuts.”
Totebo: “ Best quote ever.”
🤔
But, a first playable version is accessible from my phone via the facebook app, the messenger app and from my PC (with some strange and irregular loading errors...). It's quite rewarding. I'm just a little sad because the game is a bit laggy... I will probably have to discover the 'profile' tool in gideros to understand where it is coming from.
SinisterSoft: “ I don't create classes that much - classes are good for making things simpler but imho for frame rate they are also death by a thousand cuts.”
Totebo: “ Best quote ever.”
🤔
https://deluxepixel.com
SinisterSoft: “ I don't create classes that much - classes are good for making things simpler but imho for frame rate they are also death by a thousand cuts.”
Totebo: “ Best quote ever.”
🤔
https://deluxepixel.com
https://deluxepixel.com