IRL2 / IRL2/SubtleGame

Setup connection process

Aperta
#1 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C#
Stelle
2
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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:

![1-presentation](https://github.com/IRL2/SubtleGame/assets/1382074/6f3a7f2c-5433-4e7f-9e18-baa140a10f9f)

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).
![1-request](https://github.com/IRL2/SubtleGame/assets/1382074/11261367-4161-443f-b347-9cd5a63ea20d)

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.

![1-response](https://github.com/IRL2/SubtleGame/assets/1382074/e83d9317-565b-4b17-a09b-27696df459c2)

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

![1-connected](https://github.com/IRL2/SubtleGame/assets/1382074/956b65ea-7ae1-4431-bb9c-dadab86b0070)

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

![final](https://github.com/IRL2/SubtleGame/assets/1382074/2e55e674-cad8-48ba-8ad4-b7eff3fd457b)

When a VR client disconnects, the session it was connected to stops to free resources from the next player.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Non vengono indicati file o test. Inizia individuando gli entry point di VR client, front server, Narupa server e puppeteering client, quindi traccia come viene avviata e arrestata una sessione. Il lavoro è completo quando i flussi locali e cloud possono creare o trovare una sessione, connettere il puppeteering client, restituire le informazioni di connessione al VR client e rilasciare la sessione quando il client si disconnette.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, docker
Ambito
backend, cloud, game-dev, networking
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.