]> git.localhorst.tv Git - blank.git/blob - doc/protocol
defined and implemented join and part packets
[blank.git] / doc / protocol
1 Packets
2 =======
3
4 Ping
5 ----
6
7 To tell the other side we're still alive.
8 Both server and client will send this if they haven't sent something in
9 a while.
10
11 Code: 0
12 Payload: none
13
14
15 Login
16 -----
17
18 Sent from client to serveri as a request to join. The server may
19 respond negatively if the player name is already taken or some cap has
20 been reached.
21
22 Code: 1
23 Payload:
24         0 player name, max 32 byte UTF-8 string,
25           shorter names should be zero terminated
26
27
28 Join
29 ----
30
31 Sent by the server either as a response to a successful login or when
32 it's changing worlds.
33
34 Code: 2
35 Payload:
36          0 entity ID of the player, 32bit unsigned int
37          4 chunk coords of the player, 3x 32bit signed int
38         16 pos/vel/rot/ang of the player, 13x 32bit float
39         68 name of the world the server's currently running
40            max 32 byte UTF-8 string
41
42
43 Part
44 ----
45
46 Sent by the server either as a respons to a failed login or when the
47 client was kicked.
48 Optionally sent by the client on disconnect.
49
50 Code: 3
51 Payload: none