diff --git a/06/system_messages.html b/06/system_messages.html index 554ddc3..a8b4e39 100644 --- a/06/system_messages.html +++ b/06/system_messages.html @@ -327,7 +327,17 @@

NETMSG_SNAP

Crc Int - TODO + The crc (cyclic redundancy check) is used as a checksum verifying the integrity of the snapshot. + It is all snapshot item payloads summed together into one 32 bit integer. + The reference implementation might overflow the crc and so should you to match the exact value. + More details on how to calculate the crc can be seen in the + teeframe documentation. +
+
+ Important to understand is that the crc is not applied to only the snap items sent in this net message but the full snapshot. + Every snap msg is just a delta that might add or remove items from a previous snapshot. + So if the client already knows about a snapshot with 3 items and then another NETMSG_SNAP comes in with 3 additional items as payload + the crc has to be calculated on all 6 items that are now in the fully unpacked snapshot. @@ -388,16 +398,19 @@

NETMSG_SNAPEMPTY

NETMSG_SNAPSINGLE

- - + + - + - +
Sender:TODO
Recipient:TODO
Sender:Server
Recipient:Client
Message ID:7
Response to:TODOUpdates in the world
Expected response:TODO + The client acknowledges the Game tick + in the message NETMSG_INPUT +
@@ -407,12 +420,53 @@

NETMSG_SNAPSINGLENote

- - + - + + + + + + + + + + + + + + + + + + + + +
TODOStringGame tick IntTODO + TODO +
Delta tickInt + TODO +
CrcInt + The crc is a checksum. More details here. +
Part sizeInt + The size of this part. Meaning the size in bytes of the next raw data field. +
DataRaw + The snapshot data. Which is a bunch of packed ints. + The first is the amount of removed items. + The second is the amount of item deltas. + The third a unused zero byte. + And the following ints are all snap items. + You can read more about snap items and the structure + of this data field in the + snap items + section. +
+ One full snapshot. If it does not fit into one message it will be split into + multiple parts and send as NETMSG_SNAP instead. + +


NETMSG_SNAPSMALL

diff --git a/07/system_messages.html b/07/system_messages.html index e4d6dd1..f9a890a 100644 --- a/07/system_messages.html +++ b/07/system_messages.html @@ -727,10 +727,15 @@

NETMSG_SNAP

Message ID:6 - Response to:None + Response to: + Updates in the world - Expected response:None + Expected response: + + The client acknowledges the Game tick + in the message NETMSG_INPUT + @@ -771,7 +776,17 @@

NETMSG_SNAP

@@ -867,10 +882,15 @@

NETMSG_SNAPSINGLEMessage ID:

- + + - + +
Crc Int - TODO + The crc (cyclic redundancy check) is used as a checksum verifying the integrity of the snapshot. + It is all snapshot item payloads summed together into one 32 bit integer. + The reference implementation might overflow the crc and so should you to match the exact value. + More details on how to calculate the crc can be seen in the + teeframe documentation. +
+
+ Important to understand is that the crc is not applied to only the snap items sent in this net message but the full snapshot. + Every snap msg is just a delta that might add or remove items from a previous snapshot. + So if the client already knows about a snapshot with 3 items and then another NETMSG_SNAP comes in with 3 additional items as payload + the crc has to be calculated on all 6 items that are now in the fully unpacked snapshot.
8
Response to:NoneResponse to:Updates in the world
Expected response:NoneExpected response: + The client acknowledges the Game tick + in the message NETMSG_INPUT +
@@ -880,35 +900,35 @@

NETMSG_SNAPSINGLENote

- + - + - + - + - +
Game tickGame tick Int TODO
Delta tickDelta tick Int TODO
CrcCrc Int - TODO + The crc is a checksum. More details here.
Part sizePart size Int The size of this part. Meaning the size in bytes of the next raw data field.
DataData Raw The snapshot data. Which is a bunch of packed ints.