Skip to content

Commit 8f09c58

Browse files
Merging final GDK for Unreal 0.14.0 release
Release 0.14.0
2 parents e5de4a2 + 6f7e69c commit 8f09c58

21 files changed

+132
-26
lines changed

.buildkite/nightly.definition.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
agent_queue_id: trigger-pipelines
22
description: Nightly build and deployment of Unreal Example project
33
github:
4-
branch_configuration: []
4+
branch_configuration: ['!dry-run/* !skip-ci/* !doc/* !docs/*']
55
default_branch: master
6-
pull_request_branch_filter_configuration: []
6+
pull_request_branch_filter_configuration: ['!dry-run/* !skip-ci/* !doc/* !docs/*']
77
teams:
88
- name: Everyone
99
permission: BUILD_AND_READ

.buildkite/nightly.steps.yaml

+19-11
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
2-
ci_version: &ci_version "1.2"
2+
ci_version: &ci_version "${CI_VERSION:-0.14.0}"
33

44
steps:
5-
# New build pipeline
65
# Trigger a 4.26 build
76
- trigger: "unrealgdkbuild-ci"
87
label: "exampleproject-ci"
@@ -12,15 +11,24 @@ steps:
1211
message: "exampleproject-4.26 ${BUILDKITE_MESSAGE}"
1312
env:
1413
BUILD_TYPE: "EXAMPLE"
15-
GDK_BRANCH: "${GDK_BRANCH:-match_branch_name_pref::0.13.1}"
16-
ENGINE_BRANCH: "${ENGINE_BRANCH:-match_branch_name_pref_engine::4.26-SpatialOSUnrealGDK-0.13.1}"
14+
GDK_BRANCH: "${GDK_BRANCH:-match_branch_name_pref::0.14.0}"
15+
ENGINE_BRANCH: "${ENGINE_BRANCH_426:-match_branch_name_pref_engine::4.26-SpatialOSUnrealGDK-0.14.0}"
1716
ENGINE_MAJOR: "4.26"
1817
PROJECT_BRANCH: "main_branch::${BUILDKITE_BRANCH}"
19-
USE_FASTBUILD: "True"
20-
IS_BUILDKITE_BUILD: "True"
21-
BUILD_ANDROID: "True"
22-
SKIP_TESTS: "True"
23-
CLEAN_BUILD: "False"
24-
START_DEPLOYMENT: "True"
25-
SPATIAL_PROJECT_NAME: "unreal_gdk"
18+
USE_FASTBUILD: "${USE_FASTBUILD:-True}"
19+
IS_BUILDKITE_BUILD: "${IS_BUILDKITE_BUILD:-True}"
20+
BUILD_VARIANT: "${BUILD_VARIANT:-Development}"
21+
BUILD_ANDROID: "${BUILD_ANDROID:-True}"
22+
CLEAN_BUILD: "${CLEAN_BUILD:-False}"
23+
RUN_DEFAULT_TESTS: "${RUN_DEFAULT_TESTS:-True}"
24+
SLOW_TESTS: "${SLOW_TESTS:-False}"
25+
EXTRA_TESTS: "${EXTRA_TESTS:-}"
26+
EXTRA_TESTS_RUN_NATIVE: "${EXTRA_TESTS_RUN_NATIVE:-False}"
27+
EXTRA_TESTS_RUN_REPGRAPH: "${EXTRA_TESTS_RUN_REPGRAPH:-False}"
28+
EXTRA_TESTS_RUNS: "${EXTRA_TESTS_RUNS:-1}"
29+
START_DEPLOYMENT: "${START_DEPLOYMENT:-True}"
30+
SPATIAL_PROJECT_NAME: "${SPATIAL_PROJECT_NAME:-unreal_gdk}"
31+
BUILD_LINUX_SERVER_WORKER: "${BUILD_LINUX_SERVER_WORKER:-True}"
32+
BUILD_WINDOWS_CLIENT_WORKER: "${BUILD_WINDOWS_CLIENT_WORKER:-True}"
33+
BUILD_SIM_PLAYER_WORKER: "${BUILD_SIM_PLAYER_WORKER:-False}"
2634
# TODO: bring back deployment link notifies UNR-5391

Game/Config/DefaultEngine.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
GameDefaultMap=/Engine/Maps/Entry.Entry
33
EditorStartupMap=/Game/Maps/Control_Small.Control_Small
44
GlobalDefaultGameMode=/Game/GameMode/BP_ControlGameMode.BP_ControlGameMode_C
5-
GameInstanceClass=/Script/SpatialGDK.SpatialGameInstance
5+
GameInstanceClass=/Script/GDKShooter.GDKShooterGameInstance
66
GlobalDefaultServerGameMode=None
77
ServerDefaultMap=/Game/Maps/Control_Small.Control_Small
88

43.2 KB
Binary file not shown.
67.8 KB
Binary file not shown.
32.3 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

Game/Content/Maps/Control_Medium.umap

101 KB
Binary file not shown.

Game/Content/Maps/Control_Small.umap

30 KB
Binary file not shown.
Binary file not shown.

Game/Source/GDKShooter/Private/Controllers/GDKPlayerController.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ void AGDKPlayerController::SetUIMode(bool bIsUIMode)
115115

116116
if (bIsUIMode)
117117
{
118-
SetInputMode(FInputModeGameAndUI());
118+
FInputModeGameAndUI Mode;
119+
Mode.SetLockMouseToViewportBehavior(EMouseLockMode::LockAlways);
120+
SetInputMode(Mode);
119121
ActivateTouchInterface(nullptr);
120122
}
121123
else

Game/Source/GDKShooter/Private/Game/Components/MatchStateComponent.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void UMatchStateComponent::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>&
1919

2020
void UMatchStateComponent::SetMatchState(EMatchState NewState)
2121
{
22-
if (!GetOwner()->HasAuthority())
22+
if (!GetOwner()->HasAuthority() || CurrentState == EMatchState::NetworkFailure)
2323
{
2424
return;
2525
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved
2+
3+
4+
#include "Game/GDKShooterGameInstance.h"
5+
#include "Logging/LogMacros.h"
6+
#include "Utils/SpatialStatics.h"
7+
8+
FNetworkFailureInfo::FNetworkFailureInfo()
9+
: NetworkFailureOccurred(false)
10+
, NetworkFailureType(-1)
11+
, Reason("")
12+
{
13+
}
14+
15+
FNetworkFailureInfo::FNetworkFailureInfo(ENetworkFailure::Type InNetworkFailureType, const FString& InReason)
16+
: NetworkFailureOccurred(true)
17+
, NetworkFailureType(InNetworkFailureType)
18+
, Reason(InReason)
19+
{
20+
}
21+
22+
void UGDKShooterGameInstance::Init()
23+
{
24+
Super::Init();
25+
26+
GetEngine()->OnNetworkFailure().AddUObject(this, &UGDKShooterGameInstance::HandleOnNetworkFailure);
27+
}
28+
29+
void UGDKShooterGameInstance::HandleOnNetworkFailure(UWorld* World, UNetDriver* NetDriver, ENetworkFailure::Type NetworkFailureType, const FString& Reason)
30+
{
31+
USpatialStatics::PrintStringSpatial(World, FString::Printf(TEXT("Network Failure: %s"), *Reason), false);
32+
33+
NetworkFailureInfo = FNetworkFailureInfo(NetworkFailureType, Reason);
34+
35+
OnNetworkFailure.Broadcast(NetworkFailureInfo);
36+
}
37+
38+
void UGDKShooterGameInstance::GetNetworkFailureInfo(FNetworkFailureInfo& OutNetworkFailureInfo)
39+
{
40+
OutNetworkFailureInfo = NetworkFailureInfo;
41+
}
42+

Game/Source/GDKShooter/Private/Weapons/Projectile.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ void AProjectile::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifet
6969

7070
DOREPLIFETIME(AProjectile, bExploded);
7171
DOREPLIFETIME(AProjectile, MetaData);
72+
73+
DOREPLIFETIME_CONDITION(AProjectile, InstigatingWeapon, COND_ServerOnly);
74+
DOREPLIFETIME_CONDITION(AProjectile, InstigatingController, COND_ServerOnly);
7275
}
7376

7477
void AProjectile::PostNetReceiveVelocity(const FVector& NewVelocity)

Game/Source/GDKShooter/Public/Game/Components/MatchStateComponent.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ enum class EMatchState : uint8
1111
{
1212
PreGame UMETA(DisplayName = "PreGame"),
1313
InGame UMETA(DisplayName = "InGame"),
14-
PostGame UMETA(DisplayName = "PostGame")
14+
PostGame UMETA(DisplayName = "PostGame"),
15+
NetworkFailure UMETA(DisplayName = "NetworkFailure")
1516
};
1617

1718
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FMatchEvent, EMatchState, CurrentState);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved
2+
3+
#pragma once
4+
5+
#include "CoreMinimal.h"
6+
#include "EngineClasses/SpatialGameInstance.h"
7+
8+
#include "GDKShooterGameInstance.generated.h"
9+
10+
USTRUCT(BlueprintType)
11+
struct FNetworkFailureInfo
12+
{
13+
GENERATED_BODY()
14+
15+
FNetworkFailureInfo();
16+
FNetworkFailureInfo(ENetworkFailure::Type InNetworkFailureType, const FString& InReason);
17+
18+
UPROPERTY(BlueprintReadOnly)
19+
bool NetworkFailureOccurred;
20+
21+
UPROPERTY(BlueprintReadOnly)
22+
TEnumAsByte<ENetworkFailure::Type> NetworkFailureType;
23+
24+
UPROPERTY(BlueprintReadOnly)
25+
FString Reason;
26+
};
27+
28+
29+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnNetworkFailure, FNetworkFailureInfo, NetworkFailureInfo);
30+
31+
UCLASS()
32+
class GDKSHOOTER_API UGDKShooterGameInstance : public USpatialGameInstance
33+
{
34+
GENERATED_BODY()
35+
36+
public:
37+
virtual void Init() override;
38+
39+
void HandleOnNetworkFailure(UWorld* World, UNetDriver* NetDriver, ENetworkFailure::Type NetworkFailureType, const FString& Reason);
40+
41+
UFUNCTION(BlueprintCallable)
42+
void GetNetworkFailureInfo(FNetworkFailureInfo& NetworkFailureInfo);
43+
44+
UPROPERTY(BlueprintAssignable)
45+
FOnNetworkFailure OnNetworkFailure;
46+
47+
private:
48+
UPROPERTY()
49+
FNetworkFailureInfo NetworkFailureInfo;
50+
};

Game/Source/GDKShooter/Public/UI/TouchControls.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct SpeedStatistics
3030
if (MoveStatisticsCache.IsFull())
3131
{
3232
float OldestOffset;
33-
check(MoveStatisticsCache.Dequeue(OldestOffset));
33+
MoveStatisticsCache.Dequeue(OldestOffset);
3434
OffsetNum -= OldestOffset;
3535
}
3636
MoveStatisticsCache.Enqueue(Offset);

Game/Source/GDKShooter/Public/Weapons/Projectile.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class GDKSHOOTER_API AProjectile : public AActor
3131
UFUNCTION(BlueprintImplementableEvent)
3232
void OnMetaDataUpdated();
3333

34-
UPROPERTY(Handover)
34+
UPROPERTY(Replicated)
3535
AWeapon* InstigatingWeapon;
3636

3737
protected:
@@ -88,7 +88,7 @@ class GDKSHOOTER_API AProjectile : public AActor
8888
UFUNCTION(BlueprintNativeEvent)
8989
void ExplosionVisuals();
9090

91-
UPROPERTY(Handover)
91+
UPROPERTY(Replicated)
9292
AController* InstigatingController;
9393

9494
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = Projectile)

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
- **LICENSE:** Use of the contents of this repository is subject to the [license](LICENSE.md)
66

7-
The SpatialOS Game Development Kit (GDK) for Unreal is an Unreal Engine fork and plugin with associated projects. It gives you the features of [SpatialOS](https://documentation.improbable.io/spatialos-overview/docs), within the familiar workflows and APIs of Unreal Engine. For more information, see the GDK's [documentation website](https://documentation.improbable.io/gdk-for-unreal/docs).
7+
The SpatialOS Game Development Kit (GDK) for Unreal is an Unreal Engine fork and plugin with associated projects. It gives you the features of [SpatialOS](https://networking.docs.improbable.io/spatialos-overview), within the familiar workflows and APIs of Unreal Engine. For more information, see the GDK's [documentation website](https://networking.docs.improbable.io/gdk-for-unreal/).
88

9-
> To understand the feature-completeness, stability, performance, and support levels you can expect from the GDK, see the [product maturity lifecycle page](https://documentation.improbable.io/gdk-for-unreal/docs/product-maturity-lifecycle). For more information, visit the [development roadmap](https://github.com/spatialos/UnrealGDK/projects/1) and [Unreal features support](https://documentation.improbable.io/gdk-for-unreal/docs/unreal-features-support) pages, and contact us via our forums, or on Discord.
9+
> To understand the feature-completeness, stability, performance, and support levels you can expect from the GDK, see the [product maturity lifecycle page](https://networking.docs.improbable.io/gdk-for-unreal/v0.14.0/support/product-maturity-lifecycle). For more information, visit the [development roadmap](https://github.com/spatialos/UnrealGDK/projects/1) and [Unreal features support](https://networking.docs.improbable.io/gdk-for-unreal/v0.14.0/support/unreal-features-support) pages, and contact us via our forums, or on Discord.
1010
1111
This is the repository for the Example Project, an example shooter game that uses the GDK.
1212

@@ -18,11 +18,11 @@ In addition to the Example Project, the GDK also contains:
1818
* [The GDK plugin](https://github.com/spatialos/UnrealGDK)
1919

2020
## About the Example Project
21-
The Example Project contains gameplay and assets that are representative of a basic first-person shooter running on SpatialOS. If you want to make your own project from scratch, use the Starter Template by following the [Starter Template guide](https://documentation.improbable.io/gdk-for-unreal/docs/sample-projects-starter-template-introduction) in the GDK for Unreal documentation.
21+
The Example Project contains gameplay and assets that are representative of a basic first-person shooter running on SpatialOS. If you want to make your own project from scratch, use the Starter Template by following the [Starter Template guide](https://networking.docs.improbable.io/gdk-for-unreal/v0.14.0/tutorials-and-guides/sample-projects-starter-template-introduction) in the GDK for Unreal documentation.
2222

23-
For setup instructions, follow the [Example Project guide](https://documentation.improbable.io/gdk-for-unreal/docs/sample-projects-example-project-introduction) in the GDK for Unreal documentation.
23+
For setup instructions, follow the [Example Project guide](https://networking.docs.improbable.io/gdk-for-unreal/v0.14.0/example-project-tutorials/sample-projects-example-project-introduction) in the GDK for Unreal documentation.
2424

25-
For more information, see the [SpatialOS GDK for Unreal documentation](https://documentation.improbable.io/gdk-for-unreal/docs).
25+
For more information, see the [SpatialOS GDK for Unreal documentation](https://networking.docs.improbable.io/gdk-for-unreal/).
2626

2727
#### Game controls
2828

UnrealGDKVersion.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.13.1
1+
0.14.0

0 commit comments

Comments
 (0)