I wonder if anybody can help me. What would be the best way to start a new server instance from my game code ?
Basically I want to start a new server instance ( MyServer.exe ) and then tell clients to connect to it. I have an idea how to implement telling the clients to connect to it, I just want to know how I’m able to start an external program from within my code.
Maybe not exactly what you’re asking for but this is what we did to accomplish this:
*Create a custom server host platform, running on a server with a listen URL of some kind attached to a static port.
*The client will make a network connection to request a new server session to the host platform.
*The server host platform will spin up an instance of an Unreal game server in its own process and return the connection details (port information).
*The client will then connect directly to the game server (or through the host if you want to do some fancy tunneling).
I’m not aware of any unreal-specific way to start up instances of a server aside from just doing the work on my end. This is somewhat similar to a matchmaking server but we use the access pattern for spawning up specific instances for players to connect to.