Using the Client/Server model for peer to peer game instead of ListenServer

Hi,

To answer your questions:

  1. I believe we do generally recommend using a listen server for the case where a local client needs to also act as a match’s host. However, when playing from the editor, the engine does support launching a dedicated server for local play, even within the same process if needed, so it’s possible you could modify this functionality or implement something similar to suit your project’s needs. I don’t believe this has been tested for use in a shipped project though, as this functionality is only available in the editor.
  2. I believe the Steam OSS does not support running a client and server on the same machine, but because this is not something we’ve tried outside of the editor, it’s hard to provide specific advice on best practices and known limitations. It’s also worth noting that the dedicated server process will still incur a CPU and memory cost, as it still needs to load the level and stream in the connected clients’ cells. It’s possible that this approach could be just as expensive as a listen server, if not more so due to needing a separate server and client process on the same machine.
  3. You can see where the editor kicks off the PIE process in UEditorEngine::StartPlayInEditorSession, which calls into functions like CreateNewPlayInEditorInstance/CreateInnerProcessPIEGameInstance. These may be a useful starting point when investigating how to implement something like this.

Thanks,

Alex