1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
syntax = "proto3";
package protocol.message_s2c;
import "state.proto";
import "goodbye_reason.proto";
import "player.proto";
import "planet.proto";
message MessageS2CHello {
enum packet_info { unknown = 0; type = 0x05; }
uint32 version = 1; // The version of the protocol in use. Currently always 1.
string given_username = 2; // The username actually assigned to the player
protocol.state.State next_state = 3; // The state to switch the game into
}
message MessageS2CGoodbye {
enum packet_info { unknown = 0; type = 0x06; }
protocol.goodbye_reason.GoodbyeReason reason = 1; // The reason for the disconnect
}
message MessageS2CChat {
enum packet_info { unknown = 0; type = 0x07; }
string from = 1; // The username of the player who sent the message
string message = 2; // The contents of the chat message
}
message MessageS2CPong {
enum packet_info { unknown = 0; type = 0x08; }
}
message MessageS2CPlayersUpdate {
enum packet_info { unknown = 0; type = 0x09; }
repeated protocol.player.Player players = 1; // List of all players in the server
}
message MessageS2CPlanetData {
enum packet_info { unknown = 0; type = 0x0a; }
repeated protocol.planet.Planet planets = 1; // List of all planets on the server
}