Jump to content

Facebook instant games - create a multi-player game


Recommended Posts

I've been learning how Facebook instant games SDK works in multi-player mode for a while and still don't have a solid idea. 
Looking at the function "chooseAsync" it seems to be the one that a player (player A - master) uses to invite a friend (player B - slave) to play the game with you, fair enough. 
But then, how do we handle the accept request on player B (slave) flow?
How is player A notified that his friend accepted the challenge and is ready to play?

Same questions about when one player is waiting for his opponent to play, I believe I need to use "switchAsync" function but am a bit blurry here as well,

Link to post
Share on other sites

@Bonomi
Got it. Have you read the documentation? https://developers.facebook.com/docs/games/instant-games/guides/play-friends

1- But then, how do we handle the accept request on player B (slave) flow?
Once player B enters that context (see the documentation I shared above) it means the challenge is accepted, it is that simple. Then you can handle it on your server side.
When player B has played his turn, you could send a custom update: https://developers.facebook.com/docs/games/instant-games/guides/game-update

2- How is player A notified that his friend accepted the challenge and is ready to play?
See answer 1.

3- Same questions about when one player is waiting for his opponent to play, I believe I need to use "switchAsync" function but am a bit blurry here as well.
Not sure what you mean, but I feel my answer to 1 answers this as well.

Link to post
Share on other sites
  • 3 months later...

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.

Guest
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.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...