1 backend server that listens for requests from client:
calls Edgegap to create a new session, which possibly creates a new deployment
creates a ConnectToken
sends the connect-token the client
1 game client that compiles to wasm. Starts with a fake connect token.
There's another thread on the game client (maybe via leptos, maybe just a different thread), which
OPTION 1: leptos
the server is computed with SSR
the game client wasm is loaded and mounted when we call 'Play', it also receives the ConnectToken. Maybe starts with a fake connect token and uses connect_with_token to start the connection
OPTION 2: native
the bevy game has 2 threads, one dedicated to sending http requests to the backend (mainly to get the ConnectToken), the other just plays the game. The server thread can send messages to the game thread.
1 backend server that listens for requests from client:
1 game client that compiles to wasm. Starts with a fake connect token.
There's another thread on the game client (maybe via leptos, maybe just a different thread), which
OPTION 1: leptos
connect_with_token
to start the connectionOPTION 2: native