Skip to content

Commit 38744dc

Browse files
Merge pull request #38 from spatialos/0.6.0-rc
Example project release for UnrealGDK `0.6.0`
2 parents 2698ffc + 45a6b84 commit 38744dc

275 files changed

Lines changed: 3989 additions & 2743 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BuildProject.bat

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,35 @@
11
@echo off
2+
23
call "%~dp0ProjectPaths.bat"
3-
call %~dp0%PROJECT_PATH%\"Plugins/UnrealGDK/SpatialGDK/Build/Scripts/BuildWorker.bat" %GAME_NAME%Server Linux Development %GAME_NAME%.uproject || goto :error
4-
call %~dp0%PROJECT_PATH%\"Plugins/UnrealGDK/SpatialGDK/Build/Scripts/BuildWorker.bat" %GAME_NAME% Win64 Development %GAME_NAME%.uproject || goto :error
4+
5+
setlocal EnableDelayedExpansion
6+
7+
set GDK_DIRECTORY=""
8+
9+
rem If a project plugin exists. Use this for building.
10+
if exist "%~dp0\%PROJECT_PATH%\Plugins\UnrealGDK" (
11+
set GDK_DIRECTORY="%~dp0\%PROJECT_PATH%\Plugins\UnrealGDK\"
12+
goto :BuildWorkers
13+
)
14+
15+
rem If there is no project plugin. Find the engine plugin.
16+
call "%~dp0FindEngine.bat"
17+
18+
if %UNREAL_ENGINE%=="" (
19+
echo Error: Could not find the Unreal Engine. Please associate your '.uproject' with an engine version or ensure this game project is nested within an engine build.
20+
pause
21+
exit /b 1
22+
)
23+
24+
set GDK_DIRECTORY=%UNREAL_ENGINE%\Engine\Plugins\UnrealGDK
25+
26+
27+
:BuildWorkers
28+
echo Building worker with GDK located at %GDK_DIRECTORY%
29+
30+
call %GDK_DIRECTORY%\SpatialGDK\Build\Scripts\BuildWorker.bat %GAME_NAME%Server Linux Development "%~dp0\%PROJECT_PATH%\%GAME_NAME%.uproject" || goto :error
31+
call %GDK_DIRECTORY%\SpatialGDK\Build\Scripts\BuildWorker.bat %GAME_NAME%SimulatedPlayer Linux Development "%~dp0\%PROJECT_PATH%\%GAME_NAME%.uproject" || goto :error
32+
call %GDK_DIRECTORY%\SpatialGDK\Build\Scripts\BuildWorker.bat %GAME_NAME% Win64 Development "%~dp0\%PROJECT_PATH%\%GAME_NAME%.uproject" || goto :error
533
echo All builds succeeded.
634

735
pause

DeployGame.bat

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ spatial cloud launch %deploymentname% one_worker_test.json %deploymentname% --sn
1818
spatial project deployment tags add %deploymentname% dev_login || goto :error
1919
spatial project deployment tags add %deploymentname% status_lobby || goto :error
2020

21-
22-
2321
echo Deployment succeeded.
2422
cd ../
2523
pause

FindEngine.bat

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
@echo off
2+
3+
setlocal EnableDelayedExpansion
4+
5+
rem Get the Unreal Engine used by this project by querying the registry for the engine association found in the .uproject.
6+
set UNREAL_ENGINE=""
7+
set UPROJECT=""
8+
9+
rem First find the .uproject
10+
for /f "delims=" %%A in (' powershell -Command "Get-ChildItem %~dp0 -Depth 1 -Filter *.uproject -File | %% {$_.FullName}" ') do set UPROJECT="%%A"
11+
12+
if %UPROJECT%=="" (
13+
echo Error: Could not find uproject. Please make sure you have passed in the project directory correctly.
14+
pause
15+
exit /b 1
16+
)
17+
18+
echo Using uproject: %UPROJECT%
19+
20+
rem Get the Engine association from the uproject.
21+
for /f "delims=" %%A in (' powershell -Command "(Get-Content %UPROJECT% | ConvertFrom-Json).EngineAssociation" ') do set ENGINE_ASSOCIATION=%%A
22+
23+
echo Engine association for uproject is: %ENGINE_ASSOCIATION%
24+
25+
rem If the engine association is a path then use this. If the path is relative then it will be relative to the uproject, thus we must change directory to the uproject folder.
26+
27+
rem Grab the project path from the .uproject file.
28+
for %%i in (%UPROJECT%) do (
29+
rem file drive + file directory
30+
set UNREAL_PROJECT_DIR="%%~di%%~pi"
31+
)
32+
33+
pushd %UNREAL_PROJECT_DIR%
34+
35+
if exist "%ENGINE_ASSOCIATION%" (
36+
cd /d "%ENGINE_ASSOCIATION%"
37+
set UNREAL_ENGINE="!cd!"
38+
)
39+
40+
popd
41+
42+
rem Try and use the engine association as a key in the registry to get the path to Unreal.
43+
if %UNREAL_ENGINE%=="" (
44+
if not "%ENGINE_ASSOCIATION%"=="" (
45+
rem Query the registry for the path to the Unreal Engine using the engine association.
46+
for /f "usebackq tokens=1,2* skip=2" %%A in (`reg query "HKCU\Software\Epic Games\Unreal Engine\Builds" /v %ENGINE_ASSOCIATION%`) do (
47+
set UNREAL_ENGINE="%%C"
48+
)
49+
)
50+
)
51+
52+
rem If there was no engine association then we need to climb the directory path of the project to find the Engine.
53+
if %UNREAL_ENGINE%=="" (
54+
pushd "%~dp0"
55+
56+
:climb_parent_directory
57+
if exist Engine (
58+
rem Check for the Build.version file to be sure we have found a correct Engine folder.
59+
if exist "Engine\Build\Build.version" (
60+
set UNREAL_ENGINE="!cd!"
61+
)
62+
) else (
63+
rem This checks if we are in a root directory. If so we cannot check any higher and so should error out.
64+
if "%cd:~3,1%"=="" (
65+
echo Error: Could not find Unreal Engine folder. Please set a project association or ensure your game project is within an Unreal Engine folder.
66+
pause
67+
exit /b 1
68+
)
69+
cd ..
70+
goto :climb_parent_directory
71+
)
72+
73+
popd
74+
)
75+
76+
if %UNREAL_ENGINE%=="" (
77+
echo Error: Could not find the Unreal Engine. Please associate your '.uproject' with an engine version or ensure this game project is nested within an engine build.
78+
pause
79+
exit /b 1
80+
)
81+
82+
endlocal & set UNREAL_ENGINE=%UNREAL_ENGINE%
83+
84+
echo Unreal engine found at: %UNREAL_ENGINE%

Game/Config/DefaultEngine.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[/Script/EngineSettings.GameMapsSettings]
22
GameDefaultMap=/Game/Maps/Deployments.Deployments
33
EditorStartupMap=/Game/Maps/FPS-Start_Tiny.FPS-Start_Tiny
4-
GlobalDefaultGameMode=/Game/GameMode/BP_GDKGameMode.BP_GDKGameMode_C
4+
GlobalDefaultGameMode=/Game/GameMode/BP_DeathmatchGameMode.BP_DeathmatchGameMode_C
55
GameInstanceClass=/Script/SpatialGDK.SpatialGameInstance
66
GlobalDefaultServerGameMode=None
77
ServerDefaultMap=/Game/Maps/FPS-Start_Medium.FPS-Start_Medium
@@ -57,13 +57,12 @@ DefaultFluidFriction=0.300000
5757
SimulateScratchMemorySize=262144
5858
RagdollAggregateThreshold=4
5959
TriangleMeshTriangleMinAreaThreshold=5.000000
60-
bEnableAsyncScene=False
6160
bEnableShapeSharing=False
6261
bEnablePCM=False
6362
bEnableStabilization=False
6463
bWarnMissingLocks=True
6564
bEnable2DPhysics=False
66-
PhysicErrorCorrection=(PingExtrapolation=0.100000,ErrorPerLinearDifference=1.000000,ErrorPerAngularDifference=1.000000,MaxRestoredStateError=1.000000,PositionLerp=0.000000,AngleLerp=0.400000,LinearVelocityCoefficient=100.000000,AngularVelocityCoefficient=10.000000,ErrorAccumulationSeconds=0.500000,ErrorAccumulationDistanceSq=15.000000,ErrorAccumulationSimilarity=100.000000)
65+
PhysicErrorCorrection=(PingExtrapolation=0.100000,PingLimit=100.000000,ErrorPerLinearDifference=1.000000,ErrorPerAngularDifference=1.000000,MaxRestoredStateError=1.000000,MaxLinearHardSnapDistance=400.000000,PositionLerp=0.000000,AngleLerp=0.400000,LinearVelocityCoefficient=100.000000,AngularVelocityCoefficient=10.000000,ErrorAccumulationSeconds=0.500000,ErrorAccumulationDistanceSq=15.000000,ErrorAccumulationSimilarity=100.000000)
6766
LockedAxis=Invalid
6867
DefaultDegreesOfFreedom=Full3D
6968
BounceThresholdVelocity=200.000000
@@ -90,9 +89,10 @@ bSubsteppingAsync=False
9089
MaxSubstepDeltaTime=0.016667
9190
MaxSubsteps=6
9291
SyncSceneSmoothingFactor=0.000000
93-
AsyncSceneSmoothingFactor=0.990000
9492
InitialAverageFrameRate=0.016667
9593
PhysXTreeRebuildRate=10
9694
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)
9795

96+
[/Script/NavigationSystem.NavigationSystemV1]
97+
bAllowClientSideNavigation=True
9898

Game/Config/DefaultInput.ini

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ FOVScale=0.011110
7070
DoubleClickTime=0.200000
7171
+ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=SpaceBar)
7272
+ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_FaceButton_Bottom)
73-
+ActionMappings=(ActionName="Fire",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=LeftMouseButton)
73+
+ActionMappings=(ActionName="Primary",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=LeftMouseButton)
7474
+ActionMappings=(ActionName="Sprint",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=LeftShift)
7575
+ActionMappings=(ActionName="ShowScoreboard",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Tab)
7676
+ActionMappings=(ActionName="Crouch",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=LeftControl)
77-
+ActionMappings=(ActionName="Aim",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=RightMouseButton)
77+
+ActionMappings=(ActionName="Secondary",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=RightMouseButton)
7878
+ActionMappings=(ActionName="1",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=One)
7979
+ActionMappings=(ActionName="2",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Two)
8080
+ActionMappings=(ActionName="3",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Three)
@@ -90,6 +90,10 @@ DoubleClickTime=0.200000
9090
+ActionMappings=(ActionName="ShowMenu",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=BackSpace)
9191
+ActionMappings=(ActionName="ShowMenu",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Escape)
9292
+ActionMappings=(ActionName="ShowMenu",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=F12)
93+
+ActionMappings=(ActionName="ScrollUp",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MouseScrollUp)
94+
+ActionMappings=(ActionName="ScrollDown",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MouseScrollDown)
95+
+ActionMappings=(ActionName="QuickToggle",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Q)
96+
+ActionMappings=(ActionName="ToggleMode",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=X)
9397
+AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=W)
9498
+AxisMappings=(AxisName="MoveForward",Scale=-1.000000,Key=S)
9599
+AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=Up)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[/Script/SpatialGDKEditor.SpatialGDKEditorSettings]
2+
bDeleteDynamicEntities=True
3+
bGenerateDefaultLaunchConfig=True
4+
bStopSpatialOnExit=False
5+
SpatialOSSnapshotFile=default.snapshot
6+
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")))
7+
bGeneratePlaceholderEntitiesInSnapshot=True
8+
Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
1-
2-
31
[/Script/SpatialGDK.SpatialGDKSettings]
2+
EntityPoolInitialReservationCount=3000
3+
EntityPoolRefreshThreshold=1000
4+
EntityPoolRefreshCount=2000
5+
HeartbeatIntervalSeconds=2.000000
6+
HeartbeatTimeoutSeconds=10.000000
7+
ActorReplicationRateLimit=0
8+
EntityCreationRateLimit=0
9+
OpsUpdateRate=1000.000000
10+
bEnableHandover=True
411
bUsingQBI=True
12+
PositionUpdateFrequency=1.000000
13+
PositionDistanceThreshold=100.000000
14+
bEnableMetrics=True
15+
bEnableMetricsDisplay=False
16+
MetricsReportRate=2.000000
17+
bUseFrameTimeAsLoad=False
18+
bCheckRPCOrder=False
19+
bBatchSpatialPositionUpdates=True
20+
bEnableServerQBI=True
21+
bPackUnreliableRPCs=True
22+
bUseDevelopmentAuthenticationFlow=False
23+
DevelopmentAuthenticationToken=
24+
DevelopmentDeploymentToConnect=
25+
DefaultWorkerType=(WorkerTypeName="UnrealWorker")
26+
bEnableOffloading=True
27+
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))))
28+
ServerWorkerTypes=("UnrealWorker","AIWorker","CrashBotWorker")
29+
MaxDynamicallyAttachedSubobjectsPerClass=3
30+
bPackRPCs=True
31+
DefaultReceptionistHost=127.0.0.1
32+
MaxNetCullDistanceSquared=900000000.000000
33+
534

Game/Content/AI/BB_NPC.uasset

2.13 KB
Binary file not shown.

Game/Content/AI/BT_Wander.uasset

7.24 KB
Binary file not shown.
57.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)