Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Feature/expanse 2 #34

Open
wants to merge 58 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
e8f7981
Add external launch config for ChunkWorker
Bluexin Jan 24, 2019
fbe5e08
Revamp chunk schema
Bluexin Jan 24, 2019
614025d
Use updated reservation api
Jan 24, 2019
dd67e1d
Fix gradle fatjar and ChunkWorker executable path
Bluexin Jan 24, 2019
ebcd760
Abstract away the connection manager
Bluexin Jan 24, 2019
c97adb9
Add worker manager
Jan 24, 2019
10353ea
Fix mistake in worker manager
Jan 24, 2019
b531e29
Move service definition
Jan 24, 2019
1c20f80
Run the WorkerManager trough LaunchWrapper
Bluexin Jan 25, 2019
cf47f6f
Connect the Chunk Worker
Bluexin Jan 25, 2019
fcad5ca
Add a connection callback to the ConnectionManager
Bluexin Jan 25, 2019
d450926
Add support for View Mode in ConnectionManager
Bluexin Jan 25, 2019
a1fb38b
Update entity db
Bluexin Jan 25, 2019
0970cac
Add dummy chunk generation ability to the chunk worker
Bluexin Jan 26, 2019
8da1413
Let the client (dis)connect to/from the server
Bluexin Jan 26, 2019
b29b96d
Fix ConnectionManager to act as keep-alive again
Bluexin Jan 26, 2019
d13a4dd
Fix chunk creation after database upgrade
Bluexin Jan 26, 2019
5c4fde1
Let consumers give their own Dispatcher implementation
Bluexin Jan 26, 2019
68e24c0
Read chunk data from client (almost)
Bluexin Jan 26, 2019
3eca72c
add worker-sdk build.gradle
Jan 24, 2019
2f1445f
Package mc & forge in the workers builds
Bluexin Jan 26, 2019
8cb5969
Fix manifests
Bluexin Jan 26, 2019
5c6fd95
Fix worker types and implement base worker + doc
Bluexin Jan 27, 2019
1a0560a
Let chunk workers & clients get entities data
Bluexin Jan 27, 2019
f3461b9
Render the world
Jan 27, 2019
09cb661
Update branding
Jan 29, 2019
739ae33
Wah?
Jan 29, 2019
f375cbe
Merge branch 'develop' into feature/Spatial-14
Jan 31, 2019
71cb04b
Disable brand mixin
Feb 2, 2019
536f6d2
Implement world converter
Feb 2, 2019
ba05ffe
Update entity schema
Feb 2, 2019
148c7b6
Update chunk provider y level
Feb 2, 2019
a85879b
Fix some issues with chunk loading
Bluexin Feb 4, 2019
495f695
Update player id on client worker
Feb 4, 2019
926bcc7
Add default snapshot to test with
Feb 4, 2019
3434ab8
Work on entity syncing
Feb 4, 2019
4bc47bf
Fix chunk loading for real and update snapshot
Bluexin Feb 4, 2019
bb8606e
Update spatial launch config
Bluexin Feb 4, 2019
39c4795
Merge remote-tracking branch 'origin/feature/Spatial-14' into feature…
Feb 4, 2019
f6b706f
Update spatial launch config (fix derp)
Bluexin Feb 4, 2019
0b8a57a
Merge remote-tracking branch 'origin/feature/Spatial-14' into feature…
Feb 4, 2019
da82240
[WIP] World loading and syncing to clients (#14 #15) (#19)
Bluexin Feb 4, 2019
9e742f1
Merge branch 'develop' into feature/Expanse-2
Feb 5, 2019
916bd2d
Fix some issue with chunks
Feb 6, 2019
adfea00
Improve component requirements
Feb 7, 2019
616c340
Fix world converter formatting
Feb 7, 2019
109aef7
Fix worker service
Feb 8, 2019
d6d4c14
Add attributes to client worker
Feb 8, 2019
3c78d8f
Implement entity worker and client disconnection
Feb 8, 2019
a341bf5
Prevent player from directly updating position
Feb 12, 2019
9eb5f9c
Player syncing
Feb 12, 2019
9347eb3
Bootstrapper
Feb 25, 2019
9eea4ab
Customize main menu
Feb 25, 2019
95d40e9
Reduce timeout time to 5 seconds
Feb 25, 2019
aba5c3e
Remove used entities from the requirement callback
Feb 25, 2019
e701126
Fix *some* worker issues, update to SpatialOS 13.6.1
Bluexin Feb 27, 2019
b2456bf
Do a bit more on player syncing
Feb 28, 2019
b218f7e
Send right click with item
Feb 28, 2019
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
17 changes: 17 additions & 0 deletions default_launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
"options": {
"manual_worker_connection_only": true
}
},
{
"layer": "entity_worker",
"hex_grid": {
"num_workers": 1
},
"options": {
"manual_worker_connection_only": true
}
}
]
},
Expand Down Expand Up @@ -47,6 +56,14 @@
"all": {}
}
]
},
{
"worker_type": "EntityWorker",
"permissions": [
{
"all": {}
}
]
}
]
}
22 changes: 22 additions & 0 deletions schema/components/bootstrap.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package minecraft.boostrap;

import "components/player.schema";
import "components/general.schema";
import "components/world.schema";

// Reserves 1400-1449

type Message {
string message = 1;
}

/**
* A single chunk holds 16x16x16 states.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

copypasta doc comment should be fixed

*/
component Bootstrap {
id = 1400;
map<string, minecraft.player.GameProfile> online_players = 1;
map<uint32, minecraft.world.State> state_registry = 2;
command minecraft.general.Void on_chat(Message);
event Message on_message;
}
19 changes: 6 additions & 13 deletions schema/components/entity.schema
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package minecraft.entity;
import "improbable/standard_library.schema";
import "improbable/vector3.schema";
import "components/general.schema";

// Reserves 1000-1099

Expand Down Expand Up @@ -28,18 +30,11 @@ component Rotation {

component Motion {
id = 1005;
improbable.Coordinates coords = 1;
improbable.Vector3f motion = 1;
}

type GameProfile {
string uuid = 1;
}

component Player {
id = 1006;
GameProfile profile = 1;
bool sneaking = 2;
bool sprinting = 3;
component WorldEntity {
id= 1010;
}

component ChatAbility {
Expand All @@ -50,10 +45,8 @@ type IgnitionRequest {
int32 time = 1;
}

type Void {}

component Flammable {
id = 1008;
bool is_on_fire = 1;
command Void ignite(IgnitionRequest);
command minecraft.general.Void ignite(IgnitionRequest);
}
3 changes: 3 additions & 0 deletions schema/components/general.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package minecraft.general;

type Void {}
43 changes: 43 additions & 0 deletions schema/components/player.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package minecraft.player;

import "improbable/vector3.schema";
import "components/general.schema";

// Reserves 1450-1499

type GameProfile {
string uuid = 1;
string name = 2;
}

component PlayerInfo {
id = 1450;
GameProfile profile = 1;
}

component MapRepresentation {
id = 1453;
uint32 colour = 1;
string icon = 2;
}

type Hand {
bool main = 1;
}

component PlayerInput {
id = 1451;
improbable.Vector3f move_position = 1;
improbable.Vector3f desired_motion = 2;
bool sprinting = 3;
bool sneaking = 4;
command minecraft.general.Void item_rightclick(Hand);
}

type Heartbeat {
}

component PlayerConnection {
id = 1452;
event Heartbeat heartbeat;
}
4 changes: 2 additions & 2 deletions spatialos.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "spatial",
"project_version": "0.0.1",
"sdk_version": "13.5.0",
"sdk_version": "13.6.1",
"dependencies": [
{"name": "standard_library", "version": "13.5.0"}
{"name": "standard_library", "version": "13.6.1"}
]
}
2 changes: 1 addition & 1 deletion workers/java/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ include 'worker-sdk'
include 'worker:patcherdummy'

rootProject.name = "HorizonJavaWorker"
gradle.ext.mainClass = 'com.hrznstudio.spatial.SpatialLaunchWrapper'
gradle.ext.mainClass = 'com.hrznstudio.spatial.launch.SpatialLaunchWrapper'
54 changes: 54 additions & 0 deletions workers/java/spatialos.Bootstrapper.worker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"build": {
"tasks_filename": "spatialos.java.build.json"
},
"bridge": {
"worker_attribute_set": {
"attributes": [
"bootstrap"
]
},
"entity_interest": {
"range_entity_interest": {
"radius": 0
}
},
"streaming_query": [],
"component_delivery": {
"default": "RELIABLE_ORDERED",
"checkout_all_initially": true
}
},
"external": {
"default": {
"run_type": "EXECUTABLE_ZIP",
"linux": {
"artifact_name": "[email protected]",
"command": "java",
"arguments": [
"-jar",
"HorizonJavaWorker.jar",
"Bootstrapper"
]
},
"windows": {
"artifact_name": "[email protected]",
"command": "java",
"arguments": [
"-jar",
"HorizonJavaWorker.jar",
"Bootstrapper"
]
},
"macos": {
"artifact_name": "[email protected]",
"command": "java",
"arguments": [
"-jar",
"HorizonJavaWorker.jar",
"Bootstrapper"
]
}
}
}
}
54 changes: 54 additions & 0 deletions workers/java/spatialos.EntityWorker.worker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"build": {
"tasks_filename": "spatialos.java.build.json"
},
"bridge": {
"worker_attribute_set": {
"attributes": [
"entity_worker"
]
},
"entity_interest": {
"range_entity_interest": {
"radius": 0
}
},
"streaming_query": [],
"component_delivery": {
"default": "RELIABLE_ORDERED",
"checkout_all_initially": true
}
},
"external": {
"default": {
"run_type": "EXECUTABLE_ZIP",
"linux": {
"artifact_name": "[email protected]",
"command": "java",
"arguments": [
"-jar",
"HorizonJavaWorker.jar",
"EntityWorker"
]
},
"windows": {
"artifact_name": "[email protected]",
"command": "java",
"arguments": [
"-jar",
"HorizonJavaWorker.jar",
"EntityWorker"
]
},
"macos": {
"artifact_name": "[email protected]",
"command": "java",
"arguments": [
"-jar",
"HorizonJavaWorker.jar",
"EntityWorker"
]
}
}
}
}
6 changes: 4 additions & 2 deletions workers/java/spatialos.HorizonClientWorker.worker.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
},
"bridge": {
"worker_attribute_set": {
"attributes": []
"attributes": [
"horizon_client"
]
},
"entity_interest": {
"range_entity_interest": {
"radius": 10
"radius": 128
}
},
"streaming_query": [],
Expand Down

This file was deleted.

Loading