How do you prefer to test your network code?

So erlier versions of UE 4 you could launche a dedicated server and several clients from the editor.
And when checking off “Use Singel Process” (false) under the Advanced menu under Play dropdown menu.
I had the game running in a way that is closer to a real life scenerio.

This dose however not work anymore since 4.4 i belive, the clients never join the dedicated server.
So am wondering how do you prefer to test network code when developing in UE 4?
I like the way it was, but am not sure if epic is stile making changes and its not working as intended, or if am using it wrong.

If i Check “Use Singel Process” i have the wanted result, but it leaves me with a situation, where all clients have the Autorety level of 3.
So i never realy get to see if my network code is working as intended due to all clients have the server authorety.

Any tips on this is deeply aprichiated.
.

Commandline

I’d recommend running everything from commandline! (AKA clicking on batch files in windows explorer)

You can run a dedicated server that way and then have clients join by running a client batch file

's the batch file I use to have a client join a locally hosted listen or dedicated server setup



"C:\Program Files\Unreal Engine\4.5\Engine\Binaries\Win64\UE4Editor.exe" "%CD%\YourGame.uproject" 127.0.0.1 -game -ResX=800 -ResY=900 -WinX=800 -WinY=20 -log


You can run this as many times as you want once the dedicated/listen server is hosting to add more clients!

Thank you :smiley: i will use this method, out of curiosety, do you host your server from the editor?
I tryed this and it did not work, but making a new shortcut like this.


"C:\Program Files\Epic Games\4.5\Engine\Binaries\Win64\UE4Editor.exe" "%CD%\YourGame.uproject" -server -log

I whould prefer the old method but this dose the trick, thanks again.

Also how do you then debug your network?
Something tells me am better off downloading the full source and building a dedicated server?

Correcting my self i can join a server that is running under debug mode and join with a second client as described above.
Also when setting “Use Single Process” to false and entering 1 for client count i get a player in the view port that is present when joining with a second client.
Note: if i enter 2 second client never joins the server from the editor.

EDIT: I do have a problem that if i don`t host the server from the editor the client will only get a black screen.
The client have joined (can see debug messages) but its just black, with the exception of the screeen flashing once with level shown (then goes black).
Black (loading) > Fast image of Spawn location > Black Void (with debug messages).
Solution:


"C:\Program Files\Epic Games\4.5\Engine\Binaries\Win64\UE4Editor.exe" "%CD%YourGame.uproject" /Game/YourMapName?listen -server -log

Seems a bit od adding listen when it has the -server tag.
Cheers