Networking - widberg/fmtk GitHub Wiki
XLive is used for matchmaking and facilitating peer-to-peer communication. Since the online functionality is peer-to-peer, the "server" is included in the game binary. FUEL uses port 1000
over UDP. Games for Windows Live uses separate ports listed on the portforward.com GFWL page: TCP: 53, 80, 443, 3074; UDP: 53, 88, 3074. When using the official GFWL version, if available, UPnP is used and port forwarding is unnecessary. The string "RaceNetV0.041"
can be found in the game and is transmitted.
A Wireshark dissector for FUEL's protocol can be found in the widberg/racenet-dissector repository.
Packet Format
Name | Offset | Type |
---|---|---|
size | 0 | u16 |
index | 2 | u8 |
hash | 3 | u16 |
decompressedSize | 5 | u16 |
data | 7 | u8[size - 5] |
size
is the total size of all fields after it. index
is incremented for every unique packet sent, retransmissions are not counted. hash
is the lower u16
of the RaceNet CRC-32 of all the data following it. If the decompressedSize
is 24
or greater, the data is compressed; otherwise, the data is not compressed and can be read as is.
Including the size
and hash
fields seems unnecessary considering the UDP header already contains a length and checksum.
The compression algorithm used comes from Using PPMD for compression which itself is adapted from, but incompatible with, Dmitry Shkarin's PPMdE. There is no additional header beyond the fields already listed above. The nOrder
is 5
and nSub
is 0x10000
bytes (NOT MBytes).