Skip to content
This repository was archived by the owner on Dec 5, 2018. It is now read-only.

Commit 6183408

Browse files
committed
initial release of the Starter Project for SpatialOS
1 parent f252710 commit 6183408

File tree

79 files changed

+1523
-2
lines changed

Some content is hidden

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

79 files changed

+1523
-2
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
spatial.log
2+
spatialos_worker_packages.json
3+
build/
4+
logs/

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
1-
# StarterProject
2-
This is a SpatialOS starter project with useful core features that you can extend to build your own SpatialOS application
1+
# Starter Project
2+
---
3+
4+
*Copyright Improbable Worlds Ltd, 2017*
5+
6+
- *GitHub repository*: [https://github.com/spatialos/StarterProject](https://github.com/spatialos/StarterProject)
7+
8+
---
9+
10+
## Introduction
11+
12+
This is a SpatialOS starter project with useful core features that you can extend to build your own SpatialOS application.
13+
14+
It contains:
15+
16+
* A Player spawned on client connection as per the [Unity Client Lifecycle Guide](https://spatialos.improbable.io/docs/reference/latest/tutorials/client-lifecycle).
17+
* A Cube spawned through a snapshot via an entity template method and an Unity prefab.
18+
* The rest of the features included in the [BlankProject](https://github.com/spatialos/BlankProject).
19+
20+
If you run into problems, or want to give us feedback, please visit the [SpatialOS forums](https://forums.improbable.io/).
21+
22+
## Running the project
23+
24+
To run the project locally, first build it by running `spatial worker build`, then start the server with `spatial local start`. You can connect a client by opening the Unity project and pressing the play button, or by running `spatial local worker launch UnityClient default`. See the [documentation](https://spatialos.improbable.io/docs/reference/latest/developing/local/run) for more details.
25+
26+
To deploy the project to the cloud, first build it by running `spatial worker build -t=deployment`, then upload the assembly with `spatial cloud upload <assembly name>`, and finally deploy it with `spatial cloud launch <assembly name> <launch configuration file> <deployment name> --snapshot=<snapshot file>`. You can obtain and share links to connect to the deployment from the [console](http://console.improbable.io/projects). See the [documentation](https://spatialos.improbable.io/docs/reference/latest/developing/deploy-an-application) for more details.

default_launch.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"template": "small",
3+
"world": {
4+
"chunkEdgeLengthMeters": 50,
5+
"snapshots": {
6+
"snapshotWritePeriodSeconds": 0
7+
},
8+
"dimensions": {
9+
"xMeters": 1500,
10+
"zMeters": 1500
11+
}
12+
},
13+
"workers": [
14+
{
15+
"worker_type": "UnityWorker",
16+
"load_balancing": {
17+
"auto_hex_grid": {
18+
"num_workers": 1
19+
}
20+
},
21+
"permissions": [{
22+
"all": {}
23+
}]
24+
},
25+
{
26+
"worker_type": "UnityClient",
27+
"permissions": [{
28+
"entity_creation": {
29+
"allow": false
30+
},
31+
"entity_deletion": {
32+
"allow": false
33+
},
34+
"entity_query": {
35+
"allow": true,
36+
"components": [
37+
"*"
38+
]
39+
}
40+
}]
41+
}
42+
]
43+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package improbable.global;
2+
3+
component ClientAuthorityCheck {
4+
id = 1002;
5+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package improbable.global;
2+
3+
type CreatePlayerRequest {}
4+
type CreatePlayerResponse {}
5+
6+
component PlayerCreation {
7+
id = 1001;
8+
command CreatePlayerResponse create_player(CreatePlayerRequest);
9+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package improbable.global;
2+
3+
type Quaternion {
4+
float x = 1;
5+
float y = 2;
6+
float z = 3;
7+
float w = 4;
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package improbable.global;
2+
3+
import "improbable/global/Quaternion.schema";
4+
5+
component WorldTransform {
6+
id = 1000;
7+
EntityPosition position = 1;
8+
improbable.global.Quaternion rotation = 2;
9+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package improbable.player;
2+
3+
type ClientDisconnectRequest{}
4+
type ClientDisconnectResponse{}
5+
6+
type HeartbeatRequest{}
7+
type HeartbeatResponse{}
8+
9+
component ClientConnection {
10+
id = 1003;
11+
uint32 timeout_beats_remaining = 1;
12+
command HeartbeatResponse heartbeat(HeartbeatRequest);
13+
command ClientDisconnectResponse disconnect_client(ClientDisconnectRequest);
14+
}

snapshots/default.snapshot

154 Bytes
Binary file not shown.

snapshots/initial_world.snapshot

111 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)