1,535
edits
DrinkyBird (talk | contribs) (Update for https://bitbucket.org/Torr_Samaho/zandronum/commits/4c133967a65a) |
DrinkyBird (talk | contribs) m (Re-uploaded huffman.zip) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
== Protocol information == | == Protocol information == | ||
See "article history" to look up the protocol for prior versions. | See "article history" to look up the protocol for prior versions. | ||
Line 10: | Line 7: | ||
All Zandronum servers use '''UDP''' as their network protocol. | All Zandronum servers use '''UDP''' as their network protocol. | ||
Additionally, all traffic is compressed using the Huffman algorithm to save bandwidth. Therefore, you'll need [ | Additionally, all traffic is compressed using the Huffman algorithm to save bandwidth. Therefore, you'll need [https://wiki.zandronum.com/files/huffman.zip a copy of huffman.cpp or huffman.java] to encode and decode your traffic appropriately. | ||
There is also an implementation of the Huffman codec written in Python [https://bitbucket.org/alexmax2742/pyskull/src/fd5bf1ec8987ccb28a0861db965a087d561c0997/pyskull/huffman.py?at=default here]. Also in Python 3 [https://bitbucket.org/crimsondusk/pyskull/src/28e9f5cdd3d855d799b62fe9dc0b8f0bea7eee48/pyskull/huffman.py?at=default&fileviewer=file-view-default here]. | There is also an implementation of the Huffman codec written in Python [https://bitbucket.org/alexmax2742/pyskull/src/fd5bf1ec8987ccb28a0861db965a087d561c0997/pyskull/huffman.py?at=default here]. Also in Python 3 [https://bitbucket.org/crimsondusk/pyskull/src/28e9f5cdd3d855d799b62fe9dc0b8f0bea7eee48/pyskull/huffman.py?at=default&fileviewer=file-view-default here]. | ||
Line 173: | Line 170: | ||
| <tt>SQF_OPTIONAL_WADS</tt> || <tt>0x20000000</tt> || Which PWADs are optional | | <tt>SQF_OPTIONAL_WADS</tt> || <tt>0x20000000</tt> || Which PWADs are optional | ||
|- | |- | ||
| <tt>SQF_DEH</tt> || <tt>0x40000000</tt> || {{ | | <tt>SQF_DEH</tt> || <tt>0x40000000</tt> || List of DEHACKED patches loaded by the server. | ||
|- | |||
| <tt>SQF_EXTENDED_INFO</tt> || <tt>0x80000000</tt> || {{Devfeature|3.1|alpha}} Additional server information, see the table below for more information. | |||
|} | |||
=== Extended flags === | |||
{{Devfeature|3.1|alpha}} | |||
{| class="wikitable" | |||
! Name || Value || Description | |||
|- | |||
| <tt>SQF2_PWAD_HASHES</tt> || <tt>0x00000001</tt> || The MD5 hashes of the server's loaded PWADs. | |||
|} | |} | ||
<hr> | |||
For example, to get the server's name and player count, you'd use <tt>(SQF_NAME|SQF_NUMPLAYERS)</tt>. Use these flags appropriately; doing so saves your users' and server hosters' bandwidth. | For example, to get the server's name and player count, you'd use <tt>(SQF_NAME|SQF_NUMPLAYERS)</tt>. Use these flags appropriately; doing so saves your users' and server hosters' bandwidth. | ||
Line 188: | Line 197: | ||
|- | |- | ||
|Long || Time || Current time, this will be sent back to you so you can determine ping. | |Long || Time || Current time, this will be sent back to you so you can determine ping. | ||
|- | |||
|Long || Flags2 || {{Devfeature|3.1|alpha}} The extended information you want. Ensure you specify <tt>SQF_EXTENDED_INFO</tt> in the normal Flags field as well. This field is optional - if this field is not present, its value is inferred to be 0. Older servers will ignore this field. | |||
|} | |} | ||
Line 423: | Line 434: | ||
| <tt>SQF_DEH</tt> | | <tt>SQF_DEH</tt> | ||
| Deh patch name (one string for each deh patch) | | Deh patch name (one string for each deh patch) | ||
|- | |||
| Long | |||
| <tt>SQF_EXTENDED_INFO</tt> | |||
| {{Devfeature|3.1|alpha}} The flags specifying extended server information you will receive. Check all <tt>SQF2</tt> values against this field. | |||
|- | |||
| Byte | |||
| <tt>SQF2_PWAD_HASHES</tt> | |||
| {{Devfeature|3.1|alpha}} The number of hashes sent. | |||
|- | |||
| String | |||
| <tt>SQF2_PWAD_HASHES</tt> | |||
| {{Devfeature|3.1|alpha}} The hash of the PWAD, sent for each PWAD. The indices are the same as sent in <tt>SQF_PWADS</tt> | |||
|} | |} | ||