Not that there are a few things that still doesn't work correctly regarding instant games, we'll try to fix them ASAP with Facebook's help:- setClip() doesn't behave correctly on mobile messenger (works ok in desktop browser)- rotating the device causes layout issues, again on mobile messenger only- procedural sounds don't work in HTML, we are investigating...

Thanks to all people involved who made this possible, including Facebook team!

Comments

while i won't use this possibility soon, i think it's great that gideros is among the first sdk's supporting facebook instant games. perhaps this will make even more people realize how good and fun gideros is.

Here is the official press release, if you have a blog, twitter account, facebook, etc please spread the news:

PRESS ANNOUNCEMENT - MARCH 15th 2018Issued by: GiderosMobile (press@giderosmobile.com)Create Facebook Instant Games Using Gideros!Leading open source games development kit, GiderosMobile, has added the ability to export to the popular Facebook Instant Games platform in their latest 2018.3 update.

Gideros allows you to code your game for multiple platforms using the same API and enhanced Lua programming language. One of the key features of Gideros is the ability to code, then quickly test your game live on the target platform – with Gideros you can make code changes then instantly test how the changes affect your Facebook Instant Game!

The process of adding the new export to Gideros started in early 2018…

“The first task was to get in touch with the right people to speak to at Facebook that would allow us to join the platform. I went to London games week in January to track them down – luckily, I was successful. The Facebook team have been great at providing us with enough information to create the export.” said Anthony Ball, one of the contributors to Gideros.

To make it suitable for the new platform, Gideros had to be made more efficient - both in terms of size and speed - that job became the responsibility of Nicolas Bouquet, the main Gideros coder and responsible for the original HTML5 export.

“When I began working on Instant Games for Gideros, I thought the work would be merely to package a standard HTML5 export for new platform - I was both right and wrong!” says Nicolas.

“Gideros has had HTML5 export for years, but Facebook Instant Games brings both a deployment framework and specific gaming services, for this Gideros had to make use of specific Facebook APIs. First, I had to modify our HTML5 apps loading system to play nicely with the Instant Games launch screen, then make a ‘player’ to ease further development. This allowed me to quickly code and test integration with instant games API. Then I had to put it all together and have gideros tools export projects specifically for instant games. All this work has allowed us to greatly improve gideros performances in HTML5 – now twice as fast as it used to be!”

Gideros brings some unique features to creating Facebook Instant Games:o Live asset and code uploading from the studio directly into your Facebook Instant Game for quick and easy development (both on desktop and Android).o Direct feedback from your game into the studio to help debug your code.o Support for Facebook ads and other Facebook Instant Game features.o Go from code to a fully built Facebook Instant Game in seconds, no compile time!o Fully open source development kit with regular updates and a great support community.

One word of warning with Facebook Instant Games, you have to keep your assets to a minimum. What I'm doing is making a second project and pointing the source code to the original code from one of my games but using different assets. I then use the FBInstants variable as a switch to use different monetisation and bring in the multi-players stuff specific to Facebook Instants. I don't include the music or any really large assets and use the FBInstant variable to avoid loading them.

This way I can update the code and both my facebook instant version and my regular version of the game get their source updated and they use the same level data, etc.

I also put the loaded % to 70% (you will see this when exporting) and call a progress() routine every so often when loading the game assets, working stuff out to move that percentage up as the game initialises. I added an example to the docs to show how to do this:

A second thing, I think (but not too sure) that you need an Apple account to actually publish. I have no idea why, but when publishing they will ask you for your Apple account number!

This is the Apple dev team number that can be found on one of the Apple backend systems (possibly I connect or the actual dev account). @hgy29 has already submitted a game for approval so maybe he could clarify this.

Yes, as @SinisterSoft said Facebook will ask for your Apple Team ID, as shown under 'membership' section in your apple developer console (developer.apple.com). Only a guess there, but since apple explictly forbids custom stores, they would have allowed facebook to propose its own on iOS provided that they ensure instant developers actually own an apple dev account.

“Google Play Instant is still in closed beta and we look forward to opening it more broadly later this year. It provides a collection of extensions to the instant apps framework that better support the needs of game developers; including a higher APK size limit to 10MB, progressive download support for executable code and game assets, and support for NDK and game engines using existing tool chains. We’re also working with popular game development platform Unity, and others including Cocos, to add IDE support making it easy for developers to build instant apps.

Developers interested in working with Google on Google Play Instant can sign up on the dedicated page here, and wait for more information when the program expands.”

It is very important that the only the following API calls are made before startGameAsync has resolved:FBInstant.getSDKVersion()FBInstant.initializeAsync()FBInstant.getPlatform()FBInstant.setLoadingProgress()FBInstant.getSupportedAPIs()FBInstant.quit()FBInstant.onPause()FBInstant.player.getID()

To help do this you could create a variable called FBInstantAPI and set it to true once startGameAsync has been resolved - then only call other API commands if FBInstant is true and then if FBInstantAPI is true.

I just put loaded to 70% because that's about average for me - 70% of the time is taken before Lua gets control and my game takes over initialising things, loading, etc. For you it will be different.

It looks like Facebook have fixed a few issues over the weekend, they emailed me this morning to let me know that problems are caused if you use other facebook API commands (other than those in the list above) before startGameAsync has called the callback function. You can still do things like load assets and setLoadingProcess(), etc.

@vitalitymobile, those TTFont which are turned into bitmap fonts at runtime is those for which you supplied a character list at creation (TTFont.new("font.ttf",20,"ABCD"), even (and that's relatively new) if you actually supplied an empty character list. In the latter case, Gideros will add characters to its internal bitmap on the fly as needed.

It could be nice if this guy joined team, uh?https://github.com/SSYGEN/blog/issues/31he knows so many interesting things about unity But I guess probability is like zero if he's posessed with idea to build own engine from scratch.

@Apollo14 , this seems to be pretty off-topic but i think you should let the guy know about gideros, it would solve some of his issues with love and other engines. yet evidently it won't solve many others so he will most probably built yet another engine for his use.