I have created a session in my game, and i can connect client players.
When i try to access the current session on the server by calling GetNameSession(GameSessionName), its state is correctly set to InProgress, but the bHosting variable is always false.
Anything i should do before using that function ?
I even tried to look for sessions from the server but it doesn’t seem to see its own session.
So how can i access the current session from the server with the session properties correctly set ?
I am also researching this. Specifically I am looking for information to migrate the host.
For now this is what I know.
-There are two types of host (dedicated server and listening server).
The dedicated server runs on a “server” machine and is not a client.
The listening server run in the “client” machine (player machine) and this client can create a session and act as a server.
So, the listening server is free and dedicated server is paid.
Listening server is worse and dedicated server is better.
In listening server it’s a good idea to migrate the server from one client to another when the current server leaves the game…so other players won’t have a horrible experience in the game (it will be bad but not horrible).
I am looking for information to do this…
The theory is simple but the practice is a headache.
Another player must create a new session all other players must connect to this new session. Then the game must be restored in the same state in which the connection was lost.
I would love to see some sample code to do this.
I hope the little I know has helped you in some way.