Play with a friend

Hi there ! My company is developing a PvP trivia game with Unity and we choose Nakama as backend engine because it has everything we need and even more :slight_smile: .
Besides the random matchmaking we also need to implement a “play with friends” mode, where a user can send an invite to a facebook’s friend to join a match. Looking at the doc seems that Nakama doesn’t have such functionality out of the box, am I right ?

Welcome @GUIZARD :wave:

Looking at the doc seems that Nakama doesn’t have such functionality out of the box, am I right ?

I think the best answer is yes and no. :slight_smile: I’ll add more details on various parts I know that make up that gameplay feature:

  • Send a push notification if the player is offline. This would be done via an RPC function with Nakama that would call out to a push notification service like Leanplum, etc. The push token for each player should be stored in a storage object private to the player.
  • Send the invite when the player is online. You can be notified when the player comes online with the status feature in Nakama. Use a non-persistent in-app notification to ping the invite to the player.
  • Send a game invite which could lead to an app install via Facebook. I believe the guys at Branchio had a way to provide this feature but I don’t know if they’re around anymore. Also I’ve never used their API on a project yet so I don’t know how nice it is.

Hope this helps.

1 Like