Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .buildkite/nightly.definition.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
agent_queue_id: trigger-pipelines
description: Nightly build and deployment of Unreal Example project
github:
branch_configuration: []
default_branch: master
pull_request_branch_filter_configuration: []
teams:
- name: Everyone
permission: BUILD_AND_READ
- name: gbu/develop/unreal
permission: MANAGE_BUILD_AND_READ
25 changes: 25 additions & 0 deletions .buildkite/nightly.steps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
common: &common
agents:
- "agent_count=1"
- "capable_of_building=gdk-for-unreal"
- "environment=production"
- "machine_type=quad"
- "permission_set=builder"
- "platform=windows"
- "scaler_version=2"
- "queue=${CI_WINDOWS_BUILDER_QUEUE:-v3-1569490589-f9345a43b21a6cec-------z}"
timeout_in_minutes: 60 # TODO(ENG-548): reduce timeout once agent-cold-start is optimised.
retry:
automatic:
# This is designed to trap and retry failures because agent lost connection. Agent exits with -1 in this case.
- exit_status: -1
limit: 3
plugins:
- ca-johnson/taskkill#v4.1: ~

steps:
- label: "build-and-deploy-:windows:"
command: powershell -NoProfile -NonInteractive -InputFormat Text -Command ./ci/setup-and-build.ps1
<<: *common # This folds the YAML named anchor into this step. Overrides, if any, should follow, not precede.
artifact_paths:
- "UnrealEngine/Engine/Programs/AutomationTool/Saved/Logs/*"
4 changes: 2 additions & 2 deletions FindEngine.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set UNREAL_ENGINE=""
set UPROJECT=""

rem First find the .uproject
for /f "delims=" %%A in (' powershell -Command "Get-ChildItem %~dp0 -Depth 1 -Filter *.uproject -File | %% {$_.FullName}" ') do set UPROJECT="%%A"
for /f "delims=" %%A in (' powershell -Command "Get-ChildItem '%~dp0' -Depth 1 -Filter *.uproject -File | %% {$_.FullName}" ') do set UPROJECT="%%A"

if %UPROJECT%=="" (
echo Error: Could not find uproject. Please make sure you have passed in the project directory correctly.
Expand All @@ -18,7 +18,7 @@ if %UPROJECT%=="" (
echo Using uproject: %UPROJECT%

rem Get the Engine association from the uproject.
for /f "delims=" %%A in (' powershell -Command "(Get-Content %UPROJECT% | ConvertFrom-Json).EngineAssociation" ') do set ENGINE_ASSOCIATION=%%A
for /f "delims=" %%A in (' powershell -Command "(Get-Content '%UPROJECT%' | ConvertFrom-Json).EngineAssociation" ') do set ENGINE_ASSOCIATION=%%A

echo Engine association for uproject is: %ENGINE_ASSOCIATION%

Expand Down
6 changes: 3 additions & 3 deletions Game/Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ DefaultGraphicsPerformance=Maximum
[/Script/SpatialGDK.SpatialGameInstance]
bPreventAutoConnectWithLocator=False

[/Script/NavigationSystem.NavigationSystemV1]
bAllowClientSideNavigation=True

[/Script/Engine.PhysicsSettings]
DefaultGravityZ=-1960.000000
DefaultTerminalVelocity=4000.000000
Expand Down Expand Up @@ -93,6 +96,3 @@ InitialAverageFrameRate=0.016667
PhysXTreeRebuildRate=10
DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2)

[/Script/NavigationSystem.NavigationSystemV1]
bAllowClientSideNavigation=True

2 changes: 1 addition & 1 deletion Game/Config/DefaultSpatialGDKEditorSettings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ bDeleteDynamicEntities=True
bGenerateDefaultLaunchConfig=True
bStopSpatialOnExit=False
SpatialOSSnapshotFile=default.snapshot
LaunchConfigDesc=(Template="w2_r0500_e5",World=(Dimensions=(X=2000,Y=2000),ChunkEdgeLengthMeters=5,StreamingQueryIntervalSeconds=4,SnapshotWritePeriodSeconds=0,LegacyFlags=(("bridge_qos_max_timeout", "0"),("bridge_soft_handover_enabled", "false"),("enable_chunk_interest", "false")),LegacyJavaParams=()),ServerWorkers=((WorkerTypeName="UnrealWorker"),(WorkerTypeName="AIWorker"),(WorkerTypeName="CrashBotWorker")))
LaunchConfigDesc=(Template="w2_r0500_e5",World=(Dimensions=(X=2000,Y=2000),ChunkEdgeLengthMeters=5,SnapshotWritePeriodSeconds=0,LegacyFlags=(("bridge_qos_max_timeout", "0"),("bridge_soft_handover_enabled", "false")),LegacyJavaParams=()),ServerWorkers=((WorkerTypeName="UnrealWorker")))
bGeneratePlaceholderEntitiesInSnapshot=True

16 changes: 7 additions & 9 deletions Game/Config/DefaultSpatialGDKSettings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ ActorReplicationRateLimit=0
EntityCreationRateLimit=0
OpsUpdateRate=1000.000000
bEnableHandover=True
bUsingQBI=True
MaxNetCullDistanceSquared=900000000.000000
QueuedIncomingRPCWaitTime=1.000000
PositionUpdateFrequency=1.000000
PositionDistanceThreshold=100.000000
bEnableMetrics=True
Expand All @@ -17,18 +18,15 @@ MetricsReportRate=2.000000
bUseFrameTimeAsLoad=False
bCheckRPCOrder=False
bBatchSpatialPositionUpdates=True
MaxDynamicallyAttachedSubobjectsPerClass=3
bEnableServerQBI=True
bPackUnreliableRPCs=True
bPackRPCs=True
DefaultReceptionistHost=127.0.0.1
bUseDevelopmentAuthenticationFlow=False
DevelopmentAuthenticationToken=
DevelopmentDeploymentToConnect=
DefaultWorkerType=(WorkerTypeName="UnrealWorker")
bEnableOffloading=False
ActorGroups=(("AI", (OwningWorkerType=(WorkerTypeName="AIWorker"),ActorClasses=(/Game/Characters/Turret/BP_Turret_Base.BP_Turret_Base_C,/Game/Controllers/BP_TurretController.BP_TurretController_C,/Game/Characters/Turret/BP_TurretShield.BP_TurretShield_C,/Game/Blueprints/Weapons/BP_HeavyMachineGun_ForTurret.BP_HeavyMachineGun_ForTurret_C,/Game/Blueprints/Weapons/Grenades/Turret_Rocket_Propelled.Turret_Rocket_Propelled_C,/Game/Blueprints/Weapons/BP_RocketLauncher_Continuous.BP_RocketLauncher_Continuous_C))),("CrashBot", (OwningWorkerType=(WorkerTypeName="CrashBotWorker"),ActorClasses=(/Game/Characters/BP_CrashBot.BP_CrashBot_C,/Game/Controllers/BP_CrashBotController.BP_CrashBotController_C))))
ServerWorkerTypes=("UnrealWorker","AIWorker","CrashBotWorker")
MaxDynamicallyAttachedSubobjectsPerClass=3
bPackRPCs=True
DefaultReceptionistHost=127.0.0.1
MaxNetCullDistanceSquared=900000000.000000

ActorGroups=()
ServerWorkerTypes=("UnrealWorker")

Binary file not shown.
Binary file modified Game/Content/Characters/BP_CrashBot.uasset
Binary file not shown.
Binary file modified Game/Content/Characters/BP_CrashBot_PlacedInWorld.uasset
Binary file not shown.
Binary file modified Game/Content/Controllers/BP_CrashBotController.uasset
Binary file not shown.
Binary file modified Game/Content/GameMode/BP_DeathmatchGameState.uasset
Binary file not shown.
Binary file modified Game/Content/Maps/CrashBot_Gym.umap
Binary file not shown.
Binary file removed Game/Content/Maps/Offloading_Gym.umap
Binary file not shown.
Binary file not shown.
Binary file modified Game/Content/Splash/EdSplash.bmp
Binary file not shown.
Binary file modified Game/Content/Splash/Splash.bmp
Binary file not shown.
2 changes: 0 additions & 2 deletions Game/Source/GDKShooter.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ public GDKShooterTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
ExtraModuleNames.Add("GDKShooter");
// TODO: UNR-1791 for long-term fix
GlobalDefinitions.Add("UE_ALLOW_MAP_OVERRIDE_IN_SHIPPING=1");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ void UShootingComponent::BeginPlay()

if (!bHasTraceProvider)
{
UE_LOG(LogGDK, Error, TEXT("Shooting Component Exists without a Trace Providing component, please add an Actor Component that implements ITraceProvider."));
UE_LOG(LogGDK, Error, TEXT("Shooting Component on %s exists without a Trace Providing component, please add an Actor Component that implements ITraceProvider."),
*GetPathNameSafe(GetOwner()));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ bool UDeploymentSnapshotTemplate::WriteToSnapshotOutput(Worker_SnapshotOutputStr
// Serialize Session component data
Worker_ComponentData SessionComponentData{};
SessionComponentData.component_id = 1000;
SessionComponentData.schema_type = Schema_CreateComponentData(1000);
SessionComponentData.schema_type = Schema_CreateComponentData();
Schema_Object* SessionComponentDataObject = Schema_GetComponentDataFields(SessionComponentData.schema_type);
Schema_AddInt32(SessionComponentDataObject, 1, 1);

Worker_ComponentData DeploymentComponentData{};
DeploymentComponentData.component_id = 1001;
DeploymentComponentData.schema_type = Schema_CreateComponentData(1001);
DeploymentComponentData.schema_type = Schema_CreateComponentData();

Components.Add(SpatialGDK::Position(SpatialGDK::Origin).CreatePositionData());
Components.Add(SpatialGDK::Metadata(TEXT("Session")).CreateMetadataData());
Expand All @@ -46,7 +46,8 @@ bool UDeploymentSnapshotTemplate::WriteToSnapshotOutput(Worker_SnapshotOutputStr
SessionEntity.component_count = Components.Num();
SessionEntity.components = Components.GetData();

bool success = Worker_SnapshotOutputStream_WriteEntity(OutputStream, &SessionEntity) != 0;
Worker_SnapshotOutputStream_WriteEntity(OutputStream, &SessionEntity);
bool success = Worker_SnapshotOutputStream_GetState(OutputStream).stream_state == WORKER_STREAM_STATE_GOOD;
if (success) {
NextEntityId++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@
#include "LobbyTimerComponent.h"
#include "GDKLogging.h"
#include "GameFramework/Actor.h"
#include "Misc/CommandLine.h"

void ULobbyTimerComponent::BeginPlay()
{
#if !UE_BUILD_SHIPPING
// Developer cheat so you don't have to wait for a long time before entering a match.
const TCHAR* CommandLine = FCommandLine::Get();
FParse::Value(CommandLine, TEXT("lobbytime"), DefaultTimerDuration);
FParse::Value(CommandLine, TEXT("lobbyminplayers"), MinimumPlayersToStartCountdown);
#endif
bAutoStart = (MinimumPlayersToStartCountdown == 0);
Super::BeginPlay();
}

void ULobbyTimerComponent::InformOfPlayerCount(int32 PlayerCount)
void ULobbyTimerComponent::ServerInformOfPlayerCount_Implementation(int32 PlayerCount)
{
if (bHasTimerFinished || !GetOwner()->HasAuthority())
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved

#include "MatchTimerComponent.h"
#include "Misc/CommandLine.h"


void UMatchTimerComponent::BeginPlay()
{
#if !UE_BUILD_SHIPPING
// Developer cheat so you can run an arbitrarily long match for testing.
const TCHAR* CommandLine = FCommandLine::Get();
FParse::Value(CommandLine, TEXT("matchtime"), DefaultTimerDuration);
#endif
Super::BeginPlay();
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void USpatialSessionStateComponent::SendStateUpdate(EGDKSessionProgress SessionP
Worker_EntityId target_entity_id = SessionEntityId;
Worker_ComponentUpdate component_update = {};
component_update.component_id = SessionComponentId;
component_update.schema_type = Schema_CreateComponentUpdate(SessionComponentId);
component_update.schema_type = Schema_CreateComponentUpdate();
Schema_Object* fields_object = Schema_GetComponentUpdateFields(component_update.schema_type);
Schema_AddInt32(fields_object, 1, SessionState);
SpatialNetDriver->Connection->SendComponentUpdate(target_entity_id, &component_update);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "CoreMinimal.h"
#include "Utils/SnapshotGenerationTemplate.h"
#include <WorkerSDK/improbable/c_worker.h>

#include "DeploymentSnapshotTemplate.generated.h"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class GDKSHOOTER_API ULobbyTimerComponent : public UTimerComponent

public:

UFUNCTION(BlueprintCallable)
void InformOfPlayerCount(int32 PlayerCount);
UFUNCTION(CrossServer, Reliable, BlueprintCallable)
void ServerInformOfPlayerCount(int32 PlayerCount);
UPROPERTY(EditDefaultsOnly)
int32 MinimumPlayersToStartCountdown = 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ class GDKSHOOTER_API UMatchTimerComponent : public UTimerComponent
{
GENERATED_BODY()

protected:
virtual void BeginPlay() override;
};
58 changes: 58 additions & 0 deletions ci/common.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
function Write-Log() {
param(
[string] $msg,
[Parameter(Mandatory=$false)] [bool] $expand = $false
)
if ($expand) {
Write-Output "+++ $($msg)"
} else {
Write-Output "--- $($msg)"
}
}

function Start-Event() {
param(
[string] $event_name,
[string] $event_parent
)

# Start this tracing span.
Start-Process -NoNewWindow "imp-ci" -ArgumentList @(`
"events", "new", `
"--name", "$($event_name)", `
"--child-of", "$($event_parent)"
) | Out-Null

Write-Log "--- $($event_name)"
}

function Finish-Event() {
param(
[string] $event_name,
[string] $event_parent
)

# Emit the end marker for this tracing span.
Start-Process -NoNewWindow "imp-ci" -ArgumentList @(`
"events", "new", `
"--name", "$($event_name)", `
"--child-of", "$($event_parent)"
) | Out-Null
}

## Checks whether the specified environment variable has been set. If it has, return its value. Else return the default value.
function Get-Env-Variable-Value-Or-Default() {
param(
[string] $environment_variable_name,
[string] $default_value
)

If (Test-Path env:$environment_variable_name) {
$environment_variable_value = Get-Content -Path env:$environment_variable_name
return $environment_variable_value
} Else {
return $default_value
}
}

$ErrorActionPreference = 'Stop'
Loading