I’m having problems to the get the concept of Dedicated Server especially with Steam.
I’ve created a very simple Create and Join Game.
I’ve then replaced the OnlineSubsystem with the Steam. After starting the game steam shows up.
The question here is, if I start the editor with -SERVER it is basically a dedicated server, is it?
I wanted to test it like that to avoid having to have a source build, is that possible?
If I now try it with Steam, using LAN it finds and joins the session successfully, but then it gets a timeout when the client tries to connect to the server map. The public session crashes the server, is it even possible to make those real dedicated server tests with the public app ID, as in the documents it states that it offers only basic functionality and I guess many people use this open session here or do I have to pay to steam for those just for fun projects?
When Server now startsup, it can register itself using the registerServer. I create here a session, what is the HostingPlayerNumber here? Or I mean what is it used for at all? Can I just set player 0 here?
IOnlineSubsystem* OnlineSubsystem = IOnlineSubsystem::Get();
SessionSettings.bIsLANMatch = false;
SessionSettings.NumPublicConnections = 2;
SessionSettings.NumPrivateConnections = 0;
SessionSettings.bAllowInvites = false;
SessionSettings.bAllowJoinInProgress = true;
SessionSettings.bShouldAdvertise = true;
IOnlineSessionPtr SessionInterface = OnlineSubsystem->GetSessionInterface();
OnlineSubsystem->GetSessionInterface()->CreateSession(0, FName(“Session”), SessionSettings);
UE_LOG(LogTemp, Error, TEXT(“Session Created”));
In the Code, bUsesPresence seems to switch between a LobbySession and a InternetSession, what is the difference here?
Is it even a good idea to use a steam server best practice? In my mind this is a very simple process and I was thinking of creating a custom REST API. On Startup the server registers itself. The clients send a request to get a session. The REST API matches the players according to their steam stats and returns the URL with port to their session. Would that be a viable option or am I missing major complexity here?
Thank you very much for helping here with any of those points.