The naming is relatively free, but should still follow some simple guidelines.
In this document, *
can be replaced by any string of ASCII characters.
Any name between curly brackets (like {UUID}
represents a variable that can be changed to create more equivalent topics.)
Topics that begin by client.{UUID}
are diffusion channels meant for a specific client, identified by its UUID.
The topic client.{UUID} should only be written to by the master server, and contains status messages and logs.
Derived topics (client.{UUID}.*) can fill in multiple functions but will always concern this client and only this client.
Topics that begin by sn.{UUID}
are diffusion channels meant for a specific server node, identified by its UUID.
The topic server node.{UUID} should only be written to by the master server, and contains status messages and logs.
Derived topics (server node.{UUID}.*) can fill in multiple functions but will always concern this server node and only this server node.
Topics with a name that begin with the id of a chunk should be read by any peers interested in the events happening in the 3D space contained by this chunk.
Any topic whose name ends in .rpc
is meant to be a channel for calling remote procedures on all instances of the logical entity
represented by the chunk.
For example, one may call a procedure foo
on {CHUNK_ID}.rpc
, and all peers having this chunk loaded will execute foo
.
Key | Value |
---|---|
peer.uuid | Unique string identifier of the peer producing the message to the topic |
rpcUuid | Unique string identifier for this method call, used to identify a specific call and return a value for it |
rpName | String name of the remote procedure to be executed. Optional and can be replaced with answer (see below) |
answer | The string uuid (rpcUuid) of the rpc this message is responding to. Optional, replaces rpName when the published message is not a call but a return value. |
The values in this topic are the serialized arguments for the method call or its return value. Arguments are serialized using Message Pack, one after the other without any other formatting.
The global clock will publish the number of ticks since the start of the game to this topic. All peers are exected to listen to this topic in order to ensure synchronization of all operations.
Key | Value |
---|---|
deltaMs | The time in milliseconds (integer) between ticks |
Four bytes representing the value of the current tick as an integer.