Skip to content

Latest commit

 

History

History
75 lines (57 loc) · 4.17 KB

File metadata and controls

75 lines (57 loc) · 4.17 KB

SharedSpaces in Action

Let's look at SharedSpaces in action.

When Alice starts SharedSpaces, she begins alone in her private lobby. She is the master client and host of the lobby, as indicated by the star next to her name.

Alice wants Bob to form a group with her so they can be together between matches. She steps on the invite panel switch and sends him an invitation from her lobby. By accepting, SharedSpaces starts on Bob's headset with a deeplink message that lets him join Alice in-game. From now on, Bob will have the same lobby session ID as Alice, and they will share the same lobby.

Bob goes through the blue door to start a private match, followed by Alice. They end up in the same Blue Room, and they now have the same match session ID that corresponds to their private room. Since Bob was there first, he is the one hosting the room, and Alice is connected to him.

Alice decides to invite her friend Charlie to join their match, and he happens to be in his lobby when he accepts the invitation. Charlie has his match session ID updated with the private match ID, but on the other hand, he still retains his lobby session ID. He is still part of a different group.

When Bob leaves the blue room, Photon notifies Alice and Charlie that the master client has changed. A host migration is needed: Alice opens a new listen-server since she is the new master client of the blue room, and Charlie connects to her.

As for Bob, he started hosting his group lobby.

Now, when Charlie leaves the blue room, he does not join Bob. They are not part of the same group since they have different lobby session IDs. Instead, he goes back to his separate lobby. This can be checked by stepping on the roster panel switch, and you will see your different groups explicitly listed.

In the case of Alice, therefore, going back to the lobby means that she will rejoin Bob, who is waiting for her.

To have Charlie join their group, Alice or Bob simply need to send him an invitation from their lobby. Again, by accepting an invitation to a lobby, you also accept joining a group. Charlie's lobby session ID is updated, and the three of them will now share the same lobby between matches.