question

Divkaran avatar image
Divkaran asked

Multiplayer game with facebook friends

Hello guys,
My plan is to make a simple realtime game. The users will register using their facebook login. And they will be able to play against their friends or random players. It will have display pictures of each user, leader boards, search other people and add them. Pretty much like miniclip 8 ball pool.

So, my question is, where do I start? I don't wanna setup my own server. Also I have zero knowledge when it comes to backend. I did a little research and came to know that I can use photon/Unet for multiplayer realtime and playfab for backend. But would that be sufficient ? And how do I get facebook involved? I don't see any provision for display pics and dont know how to use facebook for user profiles in playfab.

I am quite confused and dont know where to start. Help me please :) :)

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

The place to start is by working out the specifics of your features, so that you can map out what calls you need, where to store data, etc. For example, yes, you can use our service to sign the player in using Facebook (have a look at the LoginWithFacebook API call). I'd also recommend looking at our blog post and sample project on the subject of login: https://playfab.com/blog/first-impressions-count-best-practices-friction-free-player-authentication/.

For creating rooms and matchmaking, you're also correct that Photon would be a way to do this. We had a conversation in the forums not long ago, that talks a good bit about this: https://community.playfab.com/hc/en-us/community/posts/207129407-Persistent-turn-based-games-.

Some of the features you're talking about do require using the Facebook SDK as well, though. For example, retrieving the player's Facebook display picture would mean making a call into Facebook to access it: https://developers.facebook.com/docs/graph-api/reference/user/picture/. You'll also need to understand some of the fundamentals of developing for Facebook, as you need to get an access token from them to use with our LoginWithFacebook API call. And that, in turn, requires that you have an App ID in Facebook, to identify your game to their service. Here are a few links to the sections you'll want to review:

https://developers.facebook.com/docs/apps/register
https://developers.facebook.com/docs/facebook-login/access-tokens#usertokens
https://developers.facebook.com/docs/graph-api/overview

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.