-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
111 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://wired-protocol.org/v0/schemas/host-info.json", | ||
"type": "object", | ||
"properties": { | ||
"active": { | ||
"description": "Whether the world is currently being hosted.", | ||
"type": "boolean" | ||
}, | ||
"numPlayers": { | ||
"description": "The number of currently connected players.", | ||
"type": "number" | ||
}, | ||
"maxPlayers": { | ||
"description": "The maximum number of players allowed to join.", | ||
"type": "number" | ||
}, | ||
"extras": { | ||
"type": "object" | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,44 @@ | ||
# Spatial Protocol | ||
|
||
The Wired's spatial protocol is concerned with running interactive user-created content in a dynamic 3D multiplayer environment. | ||
The Wired's spatial protocol is concerned with running interactive user-created | ||
content within a dynamic 3D multiplayer environment. | ||
|
||
## Scenes (glXF) | ||
|
||
The Wired uses the [glXF](https://github.com/KhronosGroup/glXF) file format for describing scenes. | ||
glXF is a variant of [glTF](https://github.com/KhronosGroup/glTF), focused on the composition of multiple glTF (or other glXF) assets. | ||
glTF is a well supported format for 3D models, and its extensible nature makes it a great fit for The Wired. | ||
The Wired uses the [glXF](https://github.com/KhronosGroup/glXF) file format for | ||
describing scenes. glXF is a variant of [glTF](https://github.com/KhronosGroup/glTF), | ||
focused on the composition of multiple glTF (or other glXF) assets. glTF is a | ||
well supported format for 3D models, and its extensible nature makes it a great | ||
fit for The Wired. | ||
|
||
## Scripts (WASM) | ||
|
||
The Wired uses [WebAssembly](https://webassembly.org/) (WASM) as a cross-platform compilation target and sandboxed execution environment for user scripting. | ||
Scripts use the [component model](https://github.com/WebAssembly/component-model) to interact with a set of | ||
[WIT](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md) interfaces defined by The Wired. | ||
Host environments can then implement these interfaces, allowing scripts to interact with the scene in a controlled manner. | ||
The Wired uses [WebAssembly](https://webassembly.org/) (WASM) as a cross-platform | ||
compilation target and sandboxed execution environment for user scripting. | ||
Scripts use the [component model](https://github.com/WebAssembly/component-model) | ||
to interact with a set of [WIT](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md) | ||
interfaces defined by The Wired. Host environments can then implement these | ||
interfaces, allowing scripts to interact with the outside world in a controlled | ||
manner. | ||
|
||
## Worlds | ||
|
||
Worlds are created at a user's [DWN](../social/#decentralized-web-nodes-dwns), following to the [world schema](../social/dwn/schemas/world.json). | ||
This countains metadata about the world such as a name and description, as well as the world scene. | ||
A world is a hosted multiplayer environment running some glXF scene. | ||
|
||
### Instances | ||
### Host | ||
|
||
To join a world you must join an **instance** of the world. | ||
An instance is a multiplayer room running on a host server. | ||
This server acts as a relay for communication between players within the world. | ||
Instances are created at the host server's DWN. | ||
Each world must be hosted by a central server. This server acts as a relay for | ||
communication between players within the world. | ||
|
||
Additionally the world host DWN acts as a location for world discovery, where you can, | ||
for example, query for active instances to join. | ||
Worlds are created at a host's [DWN](../social/#decentralized-web-nodes-dwns), | ||
following the [world schema](../social/dwn/schemas/world.json). This countains | ||
metadata about the world such as a name and description, as well as the glXF | ||
scene and any used assets. | ||
|
||
Additionally the host DWN acts as a location for world discovery, where you can, | ||
for example, query for active worlds to join. | ||
|
||
## Networking | ||
|
||
Networking within an instance follows a [Cap'n Proto](https://capnproto.org/) schema over [WebTransport](https://developer.mozilla.org/en-US/docs/Web/API/WebTransport). | ||
Networking within an world follows a [Cap'n Proto](https://capnproto.org/) | ||
schema over [WebTransport](https://developer.mozilla.org/en-US/docs/Web/API/WebTransport). |