Thanks for answering, I did the same thing, was wondering if anyone had ideas about what causes it to jitter.
Nice template btw, good job on that.
Hey everybody,
The SpringArmComponent issue causing network jitter is not fixed, yet. It is backlogged because the developers have more crucial issues to fix first.
As for dedicated servers, they are completely functional (even in the Shooter Game example). Here is a quick break-down of how to set one up:
Be running source. If you do not have source, you will need to get it. You can start here: https://wiki.unrealengine.com/GitHub_Setup
After building UE4, create a new C++ Project. (Remember that Template Projects aren’t setup for multiplayer and if you use one, you will not see the same functionality as in a standalone game)
2.5) This is where you’d normally start working on your game / have your game made.
Close Visual Studio and find the project folder where you created your project.
Open the Source folder and right-click -> Text Document.
Name the Text document <MyGame>Server.Target.cs. As an example, if your game is “RTS”, your file name will be, RTSServer.Target.cs.
*As a note, if you do not have the ability to change the extension on your file(s) in Windows, you will need to go to your folder options and enable that. You can do this by pressing the Start Button or clicking the Windows icon and search, “Control Panel”. Open Control Panel and then search for “Folder Options”. Open the “View” Tab and un-check * "Hide extensions for known files types, then press “Apply” then “OK”.
Open your <MyGame>.Target.cs file and add the following, replacing every “Game” with your game name. Again, as an example, if your game name is “RTS”, you would change “GameServerTarget” to RTSServerTarget and OutExtraModuleNames.Add(“Game”) to OutExtraModuleNames.Add(“RTS”).
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class GameServerTarget : TargetRules
{
public GameServerTarget(TargetInfo Target)
{
Type = TargetType.Server;
}
//
// TargetRules interface.
//
public override void SetupBinaries(
TargetInfo Target,
ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
ref List<string> OutExtraModuleNames
)
{
base.SetupBinaries(Target, ref OutBuildBinaryConfigurations, ref OutExtraModuleNames);
OutExtraModuleNames.Add("Game");
}
public override bool GetSupportedPlatforms(ref List<UnrealTargetPlatform> OutPlatforms)
{
// It is valid for only server platforms
return UnrealBuildTool.UnrealBuildTool.GetAllServerPlatforms(ref OutPlatforms, false);
}
public override List<UnrealTargetPlatform> GUBP_GetPlatforms_MonolithicOnly(UnrealTargetPlatform HostPlatform)
{
if (HostPlatform == UnrealTargetPlatform.Mac)
{
return new List<UnrealTargetPlatform>();
}
return new List<UnrealTargetPlatform> { HostPlatform, UnrealTargetPlatform.Win32, UnrealTargetPlatform.Linux };
}
public override List<UnrealTargetConfiguration> GUBP_GetConfigs_MonolithicOnly(UnrealTargetPlatform HostPlatform, UnrealTargetPlatform Platform)
{
return new List<UnrealTargetConfiguration> { UnrealTargetConfiguration.Development };
}
}
Save this file and then close it.
In your project folder (without UE4 or Visual Studio running; if they are close them) right-click on the .uproject and select “Generate Visual Studio project files”. This will take a second.
Then, open the .sln by double-clicking on it, which will open Visual Studio.
In your Solution Explorer on the right side of Visual Studio, in the Games -> MyGameName -> Source folder, you should now have the <MyGame>Server.Target.cs file.
Open the .uproject for your game and package your project by choosing File-> Package Project -> Windows -> Win64. https://docs.unrealengine.com/latest/INT/Engine/Basics/Projects/Packaging/
When the project is done packaging, again open the .sln for your project and change the build configuration from “Development Editor” to “Development Server”.
Right click on your game under “Games” and choose “Build”. This will take a while, it is building your <MyGame>Server.exe
When Visual Studio is done, go to your project folder -> Binaries -> Win64 and copy the <MyGame>Server.exe
Go to the folder where you packaged your game and open WindowsNoEditor->Binaries->Win64 and paste <MyGame>Server.exe in this folder
Right click on <MyGame>Server.exe and copy. Then right-click somewhere else and choose “Paste Shortcut”
Right click on the shortcut and go to, “Properties”.
At the end of the “Target” line add, -log
You can now launch the dedicated server for your project with this short cut.
Here is more documentation:
[Networking]
https://docs.unrealengine.com/latest/INT/Gameplay/Networking/
https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Blueprints/
https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/Networking/
https://www.unrealengine.com/blog/blueprint-networking-tutorials
[Dedicated server]
) )
Thanks for the help, we’ve done just that (following documentation above).
What we are trying to do is to build matchmaking on top of it, meaning we want a system that gathers players into groups by game parameters (like the map they want to play) and sends them to dedicated servers when they are ready to go. Shooter example does not show that, currently I’m trying to look at Unreal Tournament sources in hopes I can find an answer, so far I found something called beacons , maybe that is the answer?