Quick summary of the situation : After finishing a proof-of-concept game i’ve decided that, if possible, i want to use a dedicated server + client, even for singleplayer mode. Being able to run server gamethread logic (like many AIs) in an entirely different process than the clients gamethread logic is a nice performance gain on multicore systems.
I want to know, is it possible on Steam to have a dedicated server process AND a client process active at the same time, or can only one UE4-Steam-process be active at the same time?
The marked answer from iUltimateLP here https://answers.unrealengine.com/que…-dedicate.html indicates, as far as i understand it, that is possible, however the people in this topic are talking about having two dedicatd servers connected to Steam at the same time, while i want one client + one dedicated server connected to Steam at the same time instead (and other Steam users being able to connect with the dedicated server).
On the other hand, here https://answers.unrealengine.com/que…3361/view.html it says i’d need two different Steam account, one for client and one for server. Of course, i hope that those peopüle are mistaken.
i just want to make sure, does anyone know what the current state for UE4 with Steam is regarding this matter?
If possible, without port forwarding (i can’t demand that every player should fiddle around in his firewall and router settings just to play my game).
As far as I know, Steam doesn’t provide a hosting service. So all your questions about - can I do this, can I do that - you can answer yourself. If you can do it on your own machine, then the answer is yes. Yes you can run a dedicated server at the same time as a client - of course you can. But you cannot run two dedicated servers on the same machine unless they have different port numbers. That is just the way networking works. You can have multiple clients connecting to the same port number on the same machine but once a server starts listening on a port, then no other server can listen on the same port number on the same machine. So if you want 2 dedicated servers, then they will have to run on different machines.
Steam will distribute your server binary for you but someone will have to run it on a computer somewhere. Or at least that is my understanding. And once someone is running a server, steam will provide a mechanism for people in the same geographical area to connect to that machine, as long as their internet connect is good enough to convince steam that you are close enough to the server and keep answering all its ping requests on time. Of course, there will also be a limit on how many people can connect to a server, which will be determined by the performance characteristics of the computer running the server and your game.
So you have the option that someone hosts the game. The hosts runs a listen server on their own machine. Running it like this, other people can connect into the server as clients. But as soon as the host quits, the game stops for everybody connected.
If you run a dedicated server, then it does nothing until a client connects. And it will continue to run as long as at least one client is connected.
If you have two internet connections you can connect the pc to both then force server run under one IP and Client run on second IP address.