8BitMMO's networking stack is very simple.
Firstly, an integer is sent which contains the message's ID.
Following this, another integer is sent which contains the size of the message.
Last is the message serialized with Google Protobuf.
Since TCP does not have a concept of messages (it uses streams), you need to save all of the received data into a buffer.
If the buffer contains at least 8 bytes (two 32 bit integers), you can read the message ID and message size.
If the buffer contains at least message_size bytes, you can read the message.
You can reverse engineer the Protobuf file through the game's code. While I'm sure that you could build an automated tool to grab this, it rarely changes and you can recreate it yourself in a few minutes.
Every child of HTMud/Networking.class is a message and contains type information along with the original names. You can get the ID of a message from Networking.class; the ID is added to the list straight after the message.
Something to note is that the client sends data to the server in Big Endian format, and receives data in Little Endian format.
Big Endian is how you would normally see numbers represented (the JVM uses Big Endian). The official server is written in C++ and runs on x86 hardware, and x86 uses Little Endian encoding.
Using this information, you can easily create a proxy that decodes messages or a custom client (no serverino por favor).
edit: Here's my protobuf file. - https://github.com/maaatts/bitmmo.js/blo...tmmo.proto
Note that it's not complete.
Firstly, an integer is sent which contains the message's ID.
Following this, another integer is sent which contains the size of the message.
Last is the message serialized with Google Protobuf.
Since TCP does not have a concept of messages (it uses streams), you need to save all of the received data into a buffer.
If the buffer contains at least 8 bytes (two 32 bit integers), you can read the message ID and message size.
If the buffer contains at least message_size bytes, you can read the message.
You can reverse engineer the Protobuf file through the game's code. While I'm sure that you could build an automated tool to grab this, it rarely changes and you can recreate it yourself in a few minutes.
Every child of HTMud/Networking.class is a message and contains type information along with the original names. You can get the ID of a message from Networking.class; the ID is added to the list straight after the message.
Something to note is that the client sends data to the server in Big Endian format, and receives data in Little Endian format.
Big Endian is how you would normally see numbers represented (the JVM uses Big Endian). The official server is written in C++ and runs on x86 hardware, and x86 uses Little Endian encoding.
Using this information, you can easily create a proxy that decodes messages or a custom client (no serverino por favor).
edit: Here's my protobuf file. - https://github.com/maaatts/bitmmo.js/blo...tmmo.proto
Note that it's not complete.