Unreal Engine 4 Network Ports

Right now I am currently working on a multiplayer project, my team and I have pretty much ported over the entirety of the game-play code-base and wanted to test real, online multiplayer however there’s one thing which has been holding us back from starting a match.

I couldn’t seem to find the ports that unreal engine 4 uses for multiplayer Networking, if anyone knows or if a member of engine support could let me know it would be much appreciated.

Also, if there is any networking documentation for unreal engine 4 out there I be greatly interested in some links or likewise.

Best Regards,
Luke Anderton | VIrtus Studios

I just wanted to quickly clarify, all of our code is replicated and ready for multiplayer. We primarily need to figure out what the ports are and if there is a different method of multiplayer server hosting from unreal development kit.

Hi there!

#Port = 7777

When I start a multiplayer game using open IP (make sure steam is disabled in your config file, for now)

this is what I see

the steam error is a good thing

currently steam wont allow open IP to work correctly.

and steam itself simply will not work (soon to be fixed)

notice the listening on port part :slight_smile:

#Code to Start Multiplayer

I wrote a whole tutorial on getting multiplayer working, it still applies in beta5
http://forums.epicgames.com/threads/974712-Tutorials-Guide-Create-Multiplayer-Games-for-UE4

You can’t just open map?Listen

you have to follow the shootergame code,

the most important part is this part:

ShooterGameSession.h
bool AShooterGameSession::HostSession(int32 ControllerId, FName SessionName, const FString & GameType, bool bIsLAN, bool bIsPresence, int32 MaxNumPlayers)
{
  //check out this code from shootergame example
}

you should call this using shootergame’s method, from gameinfo/gamemode:

//~~~~~~~~~~~~~~~~~~~
// From Shootergame_menu.cpp

/** Starts the game */
bool AVictoryGameGameInfo::HostGame(APlayerController * PCOwner, const FString & GameType, const FString & InTravelURL)
{
	bool bResult = false;

	check(PCOwner != NULL);
	if (PCOwner)
	{
		AVictoryGameSession* Session = Cast(GameSession);
		if (Session)
		{
			ULocalPlayer * LP = Cast(PCOwner->Player);
			if (LP != NULL)
			{
				
				TravelURL = InTravelURL;
				//Session->OnCreatePresenceSessionComplete().AddUObject(this, &AVictoryGameGameInfo::OnCreatePresenceSessionComplete);
				
				
				if (Session->HostSession(LP->ControllerId, GameSessionName, GameType, false, true, 4))
				{
					// @todo Show loading movie
					bResult = true;
				}
				
			}
		}
	}

	return bResult;
}

#It all Does Work

In case you need encouragement that real multiplayer is actually working in UE4 with custom projects, in beta5, using the method I am describing:

My video of real multiplayer in beta5

http://forums.epicgames.com/threads/977279-Video-Footage-of-Multiplayer-Packaged-Game-In-UE4-Beta5

enjoy!

Rama

I can’t access the forum thread (“no permission”), although I created an account in the forum. Any idea why?

Hello,

This is a question from the beta version of the engine. We are marking this answered for tracking purposes. If you are experiencing an issue similar to this please post a new question.

Thank you.