MatchmakingV2, P2P host ID or IP

In P2P multiplayer I have to provide additional data to enable users to connect with each other. A bit like in PlayFab: https://learn.microsoft.com/en-us/gaming/playfab/features/multiplayer/matchmaking/peer-to-peer.

In my case it’s not IP but EOS id that’s used with their relay to connect. What way would be the best to achieve that?

Hi @kamyker ,
Just want to confirm. You want to use Foundations matchmaking with EOS P2P relay. Am I correct?

As for specifically about the technical implementation, the team will take a look next week.

@kamyker In general:

  • the game logs the player in AB and EOS to get both AB user ID and EOS user ID.
  • the game sends a matchmaking request and matchmaker the player into a session.
  • the AB Matchmaking service creates a session and invites players to join.
  • the player joins the session
  • the game saves the player’s AB User ID and EOS User ID into the AB session. You can put this mapping inside attributes field when updating a session using PatchGameSession
  • game decides who would be the Host of this P2P game, fetches all (AB - EOS) Account mappings. All non-host will establish P2P connection to Host via EOS P2P API

Hi everyone,
@vincent_accelbyte yes EOS P2P
@reza thanks but i’m unable to use PatchGameSession bcs of this error/warning:

{
 "errorCode": 20021,
 "errorMessage": "Joinability [EMPTY] is invalid",
 "name": "InvalidJoinability",
 "message": "Joinability [EMPTY] is invalid",
 "attributes": {
  "joinability": "EMPTY"
 }
}

Not sure what that means, looks like a web dashboard bug. Tried setting session template joinability to Closed and Open.

Never mind, I have to set all the fields in SessionV2GameSessionUpdateRequest. A bit weird as that means if both players try to update attributes they will overwrite each other. Or am I wrong and only session leader can update it? If so how can I check which user is the leader?

Never mind x2, I see there’s version field in config to prevent overwriting.

1 Like