question

Brent Batas (Lisk) avatar image
Brent Batas (Lisk) asked

Why is a SessionId, which claims to be a "guid," not enough to identify a match via GetMatch()

According to the documentation, a SessionId is a guid (globally unique identifier)

See RequestMultiplayerServer()

However, when we call GetMatch() we need to also pass in the QueueName in addition to the Match Id (which is equivalent to the SessionId)

What's the point of having a guid if you can't use it to uniquely identify something?

Custom Game ServersMatchmaking
zbbxk.png (2.1 KiB)
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

·
brandon@uprootstudios.com avatar image
brandon@uprootstudios.com answered

I think it's because RequestMultiplayerServer() isn't always used with matchmaking, so the Session ID isn't always a Match ID unless the server was allocated by the Matchmaker or you've requested the server and given it a Session ID equal to an existing Match ID. Furthermore, servers that haven't yet been assigned to a match have no Session ID, so there is the potential in both of these cases where you could call GetMatch() with an empty string.

4 comments
10 |1200

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

Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

Hmm, I think I sort of follow. I understand now that RequestMultiplayerServer() isn't always used with matchmaking, therefore it won't always have a MatchId and therefore GetMatch() wouldn't make sense in that case.

However, for matches that are matchmade, I'm trying to understand what use-case there is where you would have two sessions simultaneously with the same MatchId/SessionId. Can you describe a case like that? Otherwise I still don't understand why GetMatch() can't be called with just a SessionId.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Brent Batas (Lisk) commented ·

Even when we use RequestMultiplayerServer(), we also need to provide buildId and seesionId to determine one session. SessionId should be created by the game developer, the same sessionId can be used to two builds. So, when we call GetMatch(), we also need to pass the queue name.

0 Likes 0 ·
Brent Batas (Lisk) avatar image Brent Batas (Lisk) Sarah Zhang commented ·

I understand this is the API specification, but can you describe a "real world" situation where you'd want to use the same sessionId for two builds? I don't understand.

0 Likes 0 ·
Show more comments

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.