Setup connection process
- Dominant language
- C#
- Stars
- 2
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
The VR client needs to know where to connect, and the puppeteering client needs to know when to start the game.
From the player's perspective, things should be as transparent as possible. Here is the scenario I have in mind:
* player starts the game
* a start button appears
* players "clicks" the start button
* after a short loading screen, the game starts
Under the hood, the server needs:
* to start a new narupa server (or find a free one)
* start a puppeteering client connected to that narupa server
* send the connection info to the VR client
In terms of implementation, there are two cases which we should be able to fold into the same implementation:
* running locally
* running on the cloud
Because everything is called "server", here is a diagram of the different pieces:

The VR client is what the player has on their headset. The block in blue is what we control on our side, it can be on one computer in the local case, or on several in the cloud case. The sub-block in orange is what the server needs for one session: a narupa server and a puppeteering client connected to it.
The front server is always there, even if there is no session going on. When a player clicks the start button, the VR client asks for a new server to the "Front server" (in green).

The front server is in charge of starting a new session by starting a new narupa server and connecting a puppeteering client to it. In practice, all these components will likely be implemented as a docker image. Once the session is started, it gives the server's IP and port to the VR client.

Now that the VR client has the connection information, it can connect to the Narupa server and see the game.

If a second player clicks on the start button, the same process applies.

When a VR client disconnects, the session it was connected to stops to free resources from the next player.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.