Skip to content
Closed
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
logs
build/

# SpatialGDK symlinked files
# SpatialGDK project specific files
Game/Plugins/UnrealGDK/
spatial/schema/unreal
spatial/snapshots
spatial/.improbable
Game/Content/Spatial/SchemaDatabase.uasset
1 change: 1 addition & 0 deletions BuildProject.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@echo off
call "%~dp0ProjectPaths.bat"
call %~dp0%PROJECT_PATH%\"Plugins/UnrealGDK/SpatialGDK/Build/Scripts/BuildWorker.bat" %GAME_NAME%Editor Win64 Development %GAME_NAME%.uproject || goto :error
call %~dp0%PROJECT_PATH%\"Plugins/UnrealGDK/SpatialGDK/Build/Scripts/BuildWorker.bat" %GAME_NAME%Server Linux Development %GAME_NAME%.uproject || goto :error
call %~dp0%PROJECT_PATH%\"Plugins/UnrealGDK/SpatialGDK/Build/Scripts/BuildWorker.bat" %GAME_NAME% Win64 Development %GAME_NAME%.uproject || goto :error
echo All builds succeeded.
Expand Down
2 changes: 1 addition & 1 deletion Game/Config/DefaultSpatialGDKEditorSettings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ bDeleteDynamicEntities=True
bGenerateDefaultLaunchConfig=True
bStopSpatialOnExit=False
SpatialOSSnapshotFile=default.snapshot
LaunchConfigDesc=(Template="small",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=()),Workers=((WorkerTypeName="UnrealWorker",Columns=2)))
LaunchConfigDesc=(Template="small",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=()),Workers=((WorkerTypeName="UnrealWorker")))
bGeneratePlaceholderEntitiesInSnapshot=True

13 changes: 6 additions & 7 deletions LaunchSpatial.bat
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
@echo off
echo Starting a local Spatial deployment with the default launch configuration. Modify LaunchSpatial.bat if you want to use a different launch configuration.

pushd "%~dp0\spatial"
pushd %~dp0

spatial worker build build-config
call %~dp0Game\Plugins\UnrealGDK\SpatialGDK\Build\Scripts\BuildProto.bat %~dp0spatial\schema %~dp0spatial\build\dependencies\schema\standard_library\ %~dp0spatial\build\descriptor\output\schema.descriptor

rem To launch a local Spatial deployment with a different launch configuration, change the default_launch.json argument to the name of your configuration file,
rem for example one_worker_test.json or two_worker_test.json. Similarly, you can specify a different snapshot than the default one by replacing the value of
rem the --snapshot argument with the path to the snapshot you want to launch with.
spatial local launch default_launch.json --snapshot=snapshots/default.snapshot
spatial alpha local launch --main_config=spatial\spatialos.json --launch_config=spatial\deployment.json --log_directory=spatial\logs

popd

pause

116 changes: 52 additions & 64 deletions spatial/default_launch.json
Original file line number Diff line number Diff line change
@@ -1,65 +1,53 @@
{
"template": "small",
"world": {
"dimensions": {
"x_meters": 2000,
"z_meters": 2000
},
"chunk_edge_length_meters": 50,
"streaming_query_interval": 4,
"legacy_flags": [
{
"name": "streaming_query_diff",
"value": "true"
},
{
"name": "bridge_qos_max_timeout",
"value": "0"
},
{
"name": "bridge_soft_handover_enabled",
"value": "false"
},
{
"name": "qos_max_unacked_pings_rate",
"value": "10"
}
],
"snapshots": {
"snapshot_write_period_seconds": 0
}
},
"load_balancing": {
"layer_configurations": [
{
"layer": "UnrealWorker",
"rectangle_grid": {
"cols": 1,
"rows": 1
},
"options": {
"manual_worker_connection_only": true
}
}
]
},
"workers": [
{
"worker_type": "UnrealWorker",
"flags" : [],
"permissions": [
{
"all": {}
}
]
},
{
"worker_type": "UnrealClient",
"permissions": [
{
"all": {}
}
]
}
]
}
"template": "small",
"dimensionsInWorldUnits": {
"x": "2000",
"z": "2000"
},
"loadBalancing": {
"layerConfigurations": [
{
"layer": "UnrealWorker",
"rectangleGrid": {
"cols": 1,
"rows": 1
},
"options": {
"manualWorkerConnectionOnly": true
}
}
]
},
"snapshot": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove snapshot entirely? It should not be an issue.


},
"streamingQueryInterval": "4",
"runtimeFlags": [
{
"name": "streaming_query_diff",
"value": "true"
},
{
"name": "bridge_qos_max_timeout",
"value": "0"
},
{
"name": "bridge_soft_handover_enabled",
"value": "false"
},
{
"name": "qos_max_unacked_pings_rate",
"value": "10"
}
],
"workerFlags": [
{
"workerType": "UnrealWorker",
"flags": [
]
},
{
"workerType": "UnrealClient"
}
]
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line

98 changes: 49 additions & 49 deletions spatial/one_worker_test.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
{
"template": "small",
"world": {
"chunkEdgeLengthMeters": 50,
"snapshots": {
"snapshotWritePeriodSeconds": 0
},
"legacy_flags": [
{
"name": "bridge_soft_handover_enabled",
"value": "false"
},
{
"name": "enable_chunk_interest",
"value": "false"
}
],
"dimensions": {
"xMeters": 2000,
"zMeters": 2000
}
},
"load_balancing": {
"layer_configurations": [
{
"layer": "UnrealWorker",
"rectangle_grid": {
"cols": 1,
"rows": 1
"template": "small",
"dimensionsInWorldUnits": {
"x": "2000",
"z": "2000"
},
"loadBalancing": {
"layerConfigurations": [
{
"layer": "UnrealWorker",
"rectangleGrid": {
"cols": 1,
"rows": 1
}
},
{
"layer": "DeploymentManager",
"rectangle_grid": {
"rectangleGrid": {
"cols": 1,
"rows": 1
},
"options": {
"manual_worker_connection_only": true
"manualWorkerConnectionOnly": true
}
}
]
]
},
"workers": [
"snapshot": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, probably don't need it.

},
"streamingQueryInterval": "4",
"runtimeFlags": [
{
"name": "streaming_query_diff",
"value": "true"
},
{
"name": "bridge_qos_max_timeout",
"value": "0"
},
{
"name": "bridge_soft_handover_enabled",
"value": "false"
},
{
"name": "worker_start_connection_timeout_ms",
"value": "60000"
},
{
"worker_type": "UnrealWorker",
"flags": [],
"permissions": [
{
"all": {}
}
]
},
{
"worker_type": "UnrealClient",
"flags": [],
"permissions": [
{
"all": {}
}
]
"name": "enable_chunk_interest",
"value": "false"
}
]
],
"workerFlags": [
{
"workerType": "UnrealWorker",
"flags": [
]
},
{
"workerType": "UnrealClient"
}
]
}
19 changes: 10 additions & 9 deletions spatial/spatialos.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "your_project_name_here",
"project_version": "0.0.1",
"sdk_version": "13.7.1",
"dependencies": [
{
"name": "standard_library",
"version": "13.7.1"
}
]
"configurationVersion": "0.1",
"projectName": "your_project_name_here",
"schemaDescriptor": "./build/descriptor/output/schema.descriptor",
"clientWorkers": [
"./workers/unreal/spatialos.UnrealClient.worker.json"
],
"serverWorkers": [
"./workers/unreal/spatialos.UnrealWorker.worker.json"
],
"launchConfiguration": "./default_launch.json"
}
69 changes: 24 additions & 45 deletions spatial/workers/unreal/spatialos.UnrealClient.worker.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,28 @@
{
"build": {
"tasks": [
{
"name": "codegen",
"description": "required by spatial worker build build-config.",
"steps": [{"name": "No-op", "command": "echo", "arguments": ["No-op."]}]
},
{
"name": "build",
"description": "required by spatial worker build build-config.",
"steps": [{"name": "No-op", "command": "echo", "arguments": ["No-op."]}]
},
{
"name": "clean",
"description": "required by spatial worker build build-config.",
"steps": [{"name": "No-op", "command": "echo", "arguments": ["No-op."]}]
}
]
},
"bridge": {
"worker_attribute_set": {
"attributes": [
"UnrealClient"
]
"workerType": "UnrealClient",
"layer": "UnrealClient",
"entityInterest": {
"rangeEntityInterest": {
"radius": 50
}
},
"entity_interest": {
"range_entity_interest": {
"radius": 50
}
"componentDelivery": {
"default": "RELIABLE_ORDERED",
"checkoutAllInitially": true
},
"streaming_query": [
{
"global_component_streaming_query": {
"component_name": "unreal.SingletonManager"
}
},
{
"global_component_streaming_query": {
"component_name": "unreal.Singleton"
"permissions": {
"all": {}
},
"streamingQuery": [
{
"globalComponentStreamingQuery": {
"componentName": "unreal.SingletonManager"
}
},
{
"globalComponentStreamingQuery": {
"componentName": "unreal.Singleton"
}
}
}
],
"component_delivery": {
"default": "RELIABLE_ORDERED",
"checkout_all_initially": true
}
}
}
]
}
Loading