Construct 3 suggestions & ideas

Suggest and vote on ideas for Construct 3! Please note this is only one aspect of planning. We do not guarantee any features here will be implemented, even if they are top-voted ideas. The aim is just to collect feedback. Remember to search for existing submissions before adding an idea, describe your ideas as comprehensively as possible, and vote for plausible ideas that are well thought out. Please see our full guidelines on suggesting features.

43 VOTE

Instant games Choose Async, update Async and getentrypointdata implementation

Hi,

Those functions are needed in order to send share inside messenger(not as a wall post) and/or create a turn based game.(based on entry point data).

Thanks

  • Mihai Morosanu
  • May 15 2018
  • Shipped
  • Jan 14, 2019

    Admin Response

    Entry point data and updateAsync for leaderboards were already supported. Support for changing context (chooseAsync) and custom updates (updateAsync with CUSTOM action) are now supported in r134.

  • Attach files
  • fredd commented
    May 17, 2018 19:03

    chooseAsync! must update context.ID and context.TYPE
    would be awesome

  • Mihai Morosanu commented
    May 19, 2018 09:13

    I am looking to send custom invite via messenger. This can be done by chooseasync (this changes the game to be sort of 1-1 turn based). after this command, if you do postupdate, the update is like a message in messenger that can be customized. Thanks

  • Renato Duchini commented
    June 06, 2018 14:26

    Please implement it

  • fred sthlm commented
    June 13, 2018 18:23

    What is needed:

     

    chooseAsync() - Does not exist at all in the plugin atm.


    updateAsync() - This can be two default types.
    1.Leaderboard (exist now and works perfect!)
    2. Custom - does not exist at all in plugin.

     

    matchPlayerAsync() - does notexist. used to find random player to play against!

     

  • Erik Malm commented
    September 29, 2018 07:44

    ChooseAsync

    updateAsync

    switchGame

  • Renato Duchini commented
    November 12, 2018 21:21

    Please Ashley, take a look at it. It has 31 votes already.

    All details was give in the comments.

    For chooseAsync, aside from invite dialogue (I already use it using browser exec javascript), we need the event that triggers when the context changes successfully

  • FredrikSthlm . commented
    December 19, 2018 13:18

    The functions we (I) want in the plugin:

     

    canSubscribeBotAsync( )
    subscribeBotAsync( )

    To subscribe to a bot, is similar as the function to create the shortcut. (Which is already implemented in the official plugin)
    Everything regarding bots are handled in a Messenger app within Facebook, not the Instant Games app, so you do not need to handle any other case than this subscribe function. (This is an easy function to call, and basically nothing to trigger or later handle)

     

    UpdateAsync

    This function can be 'Leaderboard' or 'Custom'. The predefined 'Leaderboard function already exist but we also need the Custom, as well. So we can specify a message, button, image etcetera.
    This is very similar as ShareAsync.
    (Currently everyone has to use via Browser>Javascript for this but that is not user friendly and hard to post images)
    https://developers.facebook.com/docs/games/instant-games/sdk/fbinstant6.2#customupdatepayload

     

    ChooseAsync

    This function will open a facebook window where you can chose context (like a group of friends). This function needs a trigger to see if we actually did chenge context or not. A context has a TYPE and an ID. These variables needs to be changed if a chooseAsync resolves. This is a vital function, since IG basically are built on contexts. For leaderboards, updates and all. So then chooseAsync is used to switch context, without exiting the game.
    (Currently we use browser>javascript, but is not suitable since we need triggers).

     

    switchGameAsync()

    super easy function without any callback, just specify a ID (of another game) on the action.
    (this we also have to do via browser>javascript currently)


    getSupportedAPIs()

    This returns an array with values. List of API functions that the client explicitly supports. this returns values from the FB IG API of supported features for the open session. Like if the device you use supports certain functions.So you later can use this as conditions. This is part of IG "Best practice" so you do not use functionalities that are not supported for certain users. May need some investigation to see how the values are received.

    showAsync( ) & LoadAsync() 

    Currently you have a function to LoadAsync, where you can specify to load an Interstitial or a RewardedVideo. This works fine.
    But the ShowAsync can only show the last loaded ad. It would be fine to distinguish the function so you have events specialised for Interstitial and for RewardedVideo, since the games want to have both loaded and possible to be showed withing the same layout.
    This though require to rewrite the function and events in the plugin to handle both types simultaneously.

  • FredrikSthlm . commented
    December 20, 2018 14:55

    Example of the Choose Async

  • FredrikSthlm . commented
    December 20, 2018 15:24

    example of updateAsync

  • rishi kant commented
    06 Jan 21:26
    where i can find
    canSubscribeBotAsync( )
    subscribeBotAsync( )

    function i have instant game in built plugin and extended plugin but i didn't find .these two

    And i also want to ask how to setup turn based instant game in construct.