Skip to content

Commit

Permalink
Merge pull request #14 from 4Players/ue-networking-5.4
Browse files Browse the repository at this point in the history
Ue networking 5.4
  • Loading branch information
SFuhrmann authored Oct 18, 2024
2 parents defb418 + 4b9079e commit ef5c2bd
Show file tree
Hide file tree
Showing 11 changed files with 455 additions and 10 deletions.
1 change: 1 addition & 0 deletions .vsconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"Microsoft.VisualStudio.Component.Windows10SDK.22621",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.VisualStudio.Workload.ManagedDesktop",
"Microsoft.VisualStudio.Workload.NativeCrossPlat",
"Microsoft.VisualStudio.Workload.NativeDesktop",
"Microsoft.VisualStudio.Workload.NativeGame"
]
Expand Down
29 changes: 23 additions & 6 deletions Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ GameName=OdinUnrealSample
[/Script/Engine.Engine]
+ActiveClassRedirects=(OldClassName="/Script/PhotonDemoParticle.PhotonLBClient",NewClassName="/Script/OdinUnrealSample.PhotonLBClient")

[/Script/Engine.Engine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/OnlineSubsystemEOS.NetDriverEOS",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
+NetDriverDefinitions=(DefName="DemoNetDriver",DriverClassName="/Script/Engine.DemoNetDriver",DriverClassNameFallback="/Script/Engine.DemoNetDriver")

[/Script/EngineSettings.GameMapsSettings]
EditorStartupMap=/Game/Maps/Lobby.Lobby
TransitionMap=
Expand Down Expand Up @@ -290,35 +295,47 @@ ManualIPAddress=
[/Script/OnlineSubsystemEOS.EOSSettings]
CacheDir=CacheDir
DefaultArtifactName=OdinTechDemo
RTCBackgroundMode=
TickBudgetInMilliseconds=0
bEnableOverlay=True
bEnableSocialOverlay=False
bEnableEditorOverlay=True
bUseLauncherChecks=true
bPreferPersistentAuth=False
TitleStorageReadChunkLength=0
+Artifacts=(ArtifactName="OdinTechDemo",ClientId="xyza7891sGny9XgwwoemBhEtcdqBLJzF",ClientSecret="PuhTi6v+f1CJZ4U6ciXomR5mqszjvMtIaJZtUb3MFvc",ProductId="d32c08ed3f8748ed9acd524f76a0984f",SandboxId="28c4620348f946829cfa7dd482ea5b2b",DeploymentId="d3c8d8c7ed0d4d87ab7a50c2a0094c45",ClientEncryptionKey="ab7adf02eb4473d8ee6296275acc4ef426492705021963df282ef37915abe8b9")
+Artifacts=(ArtifactName="OdinTechDemo",ClientId="xyza7891Cuze2kv36y1wIGenT7FgzWma",ClientSecret="Ey5yR1Fsy49Z/U5uPhUVtpu4HwxRKito24mGLiEWVPA",ProductId="2082b359b5594412b2e9730a2e1ce26d",SandboxId="ce2a6d01a5124712b6b6de49f84631ed",DeploymentId="3f586ca0c3e340f69a53d7d0b08f08cf",ClientEncryptionKey="ab7adf02eb4473d8ee6296275acc4ef426492705021963df282ef37915abe8b9")
-AuthScopeFlags=BasicProfile
-AuthScopeFlags=FriendsList
-AuthScopeFlags=Presence
bUseEAS=False
bUseEOSConnect=False
bUseEAS=True
bUseEOSConnect=True
bMirrorStatsToEOS=False
bMirrorAchievementsToEOS=False
bUseEOSSessions=True
bMirrorPresenceToEAS=False
SteamTokenType=Session

[OnlineSubsystemEOS]
bEnabled=true

[OnlineSubsystem]
DefaultPlatformService=Null
DefaultPlatformService=EOS

[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemEOS.NetDriverEOS",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemEOS.NetDriverEOS",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[/Script/OnlineSubsystemEOS.NetDriverEOSBase]
bIsUsingP2PSockets=true

[/Script/OnlineSubsystemEOS.NetDriverEOS]
bIsUsingP2PSockets=true

[/Script/SocketSubsystemEOS.NetDriverEOS]
bIsUsingP2PSockets=true

[/Script/SocketSubsystemEOS.NetDriverEOSBase]
bIsUsingP2PSockets=true

[/Script/LinuxTargetPlatform.LinuxTargetSettings]
OcclusionPlugin=Built-in Occlusion

Expand Down
Binary file modified Content/Blueprints/Game/GameInstance_TD.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Game/TopDownController.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Lobby/LobbyGameMode.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Odin/OdinClientComponent.uasset
Binary file not shown.
Binary file modified Content/Blueprints/Widgets/LobbyMenu.uasset
Binary file not shown.
17 changes: 15 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,25 @@ The Demo showcases the usage of ODIN together with Unreal's Audio Engine. The ex

## Getting Started

In the releases you can find a pre-built game executable and the current project's code base. The pre-built game can likely be executed without any installations required - if you do not have the redistributable packages of C++ installed, that Unreal needs, you can find it in the `\Engine\Extras\Redist\en-us`folder of the pre-built game.
In the releases you can find a pre-built game executable and the current project's code base. The pre-built game can likely be executed without any installations required - if you do not have the redistributable packages of C++ installed, that Unreal needs, you can find it in the `\Engine\Extras\Redist\en-us` folder of the pre-built game. Per platform there are two builds available in a release with different Online Subsystems active, changing how clients connect to each other:
1. EOS Online Subsystem: This uses EOS for matchmaking. This version of the demo game needs the user to login to their Epic Games Account and allow the Demo Game to access basic information (user name and online presence).
1. No Online Subsystem (also called "NULL"): This uses matchmaking over a local network. No account needed for this version but you will only be able to find other clients in the same local network.

To open the project in the Unreal Editor you need to install the Unreal Engine 5.3 or higher. You can open the source code with the corresponding version of the branch easily. If you need to open it with a higher version of the Unreal Engine you can right-click the `OdinUnrealSample.uproject` file and `Switch Unreal Engine version ...` to the Engine version you have installed that you want the project to open with. If the Editor fails to launch, rebuild the project from Visual Studio. You might also need to exchange the Odin Plugin to the corresponding version, downloadable e.g. in its [Github Repository](https://github.com/4Players/odin-sdk-unreal/releases).
To open the project in the Unreal Editor you need to install the Unreal Engine 5.4 or higher. You can open the source code with the corresponding version of the branch easily. If you need to open it with a higher version of the Unreal Engine you can right-click the `OdinUnrealSample.uproject` file and `Switch Unreal Engine version ...` to the Engine version you have installed that you want the project to open with. If the Editor fails to launch, rebuild the project from Visual Studio. You might also need to exchange the Odin Plugin to the corresponding version, downloadable e.g. in its [Github Repository](https://github.com/4Players/odin-sdk-unreal/releases).

:warning: In UE5.4 currently there is a bug, which causes UnfocusedVolumeMultiplier to not apply to the Odin Synth - so testing is best done on 2 devices instead of starting two clients in the editor process.

To change the Online Subsystem in the Unreal project open the `Config\DefaultEngine.ini` and change the lines
```
[OnlineSubsystem]
DefaultPlatformService=EOS
```
to
```
[OnlineSubsystem]
DefaultPlatformService=NULL
```

### Installing Visual Studio and Compiling the Project

As stated above, sometimes it is necessary to compile from Visual Studio:
Expand Down
4 changes: 2 additions & 2 deletions Source/OdinUnrealSample/OdinUnrealSample.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public class OdinUnrealSample : ModuleRules
public OdinUnrealSample(ReadOnlyTargetRules Target) : base(Target)
{
MinFilesUsingPrecompiledHeaderOverride = 1;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystem", "OnlineSubsystemUtils" });
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "EnhancedInput", "OnlineSubsystem", "OnlineSubsystemUtils", "OnlineSubsystemEOS" });

PrivateDependencyModuleNames.AddRange(new string[] { });
PrivateDependencyModuleNames.AddRange(new string[] { });

DynamicallyLoadedModuleNames.Add("OnlineSubsystemNull");

Expand Down
Loading

0 comments on commit ef5c2bd

Please sign in to comment.