@NAME Protocol Spec, r1

Glossary

Words written between [brackets] are abbreviations for the following data types:

Preface

@NAME is a voxel-based video game with a simple, flexible network protocol.

$00 — Disconnect (CiSo, CoSi)

Sent by the client to announce they are about to disconnect, and sent by the server to tell a client they have been forcibly disconnected.

Structure
Packet Length   [U16] = 1 + Length of Reason Message
Packet Opcode   [U8]  = $00
Reason Message  [Str] = ...

$01 — Ping (CiSo, CoSi)

Sent occasionally by both the client and server to eachother as a keep-alive mechanism. The recommended frequency for sending this packet is ~500ms.

The contents of the [U32] 'data' field are implementation-defined. The recipient sends back a ping packet containing a 'data' field of the same value that was received.

Structure
Packet Length  [U16] = 5
Packet Opcode  [U8]  = $01
         Data  [U32] = ...

$02 — Message (CiSo, CoSi)

Message Channels

IPC Messages

IPC Message fields are tab-separated (U+0009). Their descriptions are written here with spaces for readability.

Structure
Packet Length  [U16] = 2 + Length of Message Data
Packet Opcode  [U8]  = $02
      Channel  [U8]  = (See 'Message Channels' section above)
 Message Data  [Str] = ...