Bonomi Posted December 31, 2019 Share Posted December 31, 2019 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, Quote Link to comment Share on other sites More sharing options...
Noel Posted January 4, 2020 Share Posted January 4, 2020 @Bonomi What kind of game are you making? Is it turn based? Do you have a server side? Superatons 1 Quote Link to comment Share on other sites More sharing options...
Bonomi Posted January 6, 2020 Author Share Posted January 6, 2020 @Noel the game is very similar to the tic tac toe, it is turn based and I have a backend. Quote Link to comment Share on other sites More sharing options...
Noel Posted January 8, 2020 Share Posted January 8, 2020 @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. Superatons and plicatibu 2 Quote Link to comment Share on other sites More sharing options...
Superatons Posted April 25, 2020 Share Posted April 25, 2020 I do not understand how to implement the following link with socket.io Quote Link to comment Share on other sites More sharing options...
Noel Posted April 28, 2020 Share Posted April 28, 2020 @Superatons And I don't understand your question. Could you provide more information? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.