Jump to content

Launcher protocol: Difference between revisions

m
Re-uploaded huffman.zip
(Created page with "This launcher protocol lets you to talk to servers and get information from them, allowing you to make your own custom programs like browsers, stat tools, and so on. == Proto...")
 
m (Re-uploaded huffman.zip)
(6 intermediate revisions by the same user not shown)
Line 2: Line 2:


== Protocol information ==
== Protocol information ==
Version: '''0.58''' (October 28, 2012), compatible with the developmental version, 1.1.
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 [http://www.skulltag.com/download/huffman.zip a copy of huffman.cpp or huffman.java] to encode and decode your traffic appropriately.
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> || {{devfeature|3.0|151228-1140}} List of DEHACKED patches loaded by the server.
| <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 402: Line 413:
| Long
| Long
| <tt>SQF_ALL_DMFLAGS</tt>
| <tt>SQF_ALL_DMFLAGS</tt>
| The value of the flags (Sent for each flag in the order dmflags, dmflags2, dmflags3, compatflags, compatflags2)
| The value of the flags (Sent for each flag in the order dmflags, dmflags2, zadmflags, compatflags, zacompatflags, compatflags2)
|-
|-
| Byte
| Byte
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>
|}
|}