D2X - Tracker Services | |
In-Game Tracker | |
IntroductionThe best the original Descent 2 could offer in terms of multiplayer networking was the IPX protocol, which doesn't lend itself easily to other environments than a LAN and requires additional software like KALI to be able to play multiplayer games over the internet. After implementing peer-to-peer UDP/IP networking in D2X-XL, the next logical step was to implement tracker code to make it easier to find a D2X-XL game host and join UDP/IP multiplayer matches. Tracker BasicsA tracker is simply a software running on some server that allows game hosts to register with their IP address and that keeps a list of registered game hosts that can be downloaded by game clients. In the case of D2X-XL, the game clients will subsequently use the IP addresses from the server list to directly connect to the game hosts and display the games offered there. User Interface
The easiest way to add tracker functionality to D2X-XL was to use its built in game server
browser. Of course, this brings some limitations, like the ability to only see 12 game servers.
Given today's popularity of D2, I have decided to stick with this limit for the time being. Details
Game Host List Format
'S' (1 Byte) Tracker Registration Request Format
'S' (1 Byte) Note that the tracker will not send a response to the game host registering. Game List Download Request Format
'R' (1 Byte) Adding Trackers To D2X-XLTrackers can be added to D2X-XL by adding parameters to the d2x.ini file residing in the Descent 2 folder. (if there is no such file, create a new text file with that name there). First you need to specify how many trackers you want to set with the switch
Then define each tracker with the switch
This could look like the following:
-tracker1 82.165.136.196:9424 -tracker2 166.99.137.32:9424 -tracker3 220.131.37.18:9424 D2X-XL will set one hard-coded tracker at program start. That tracker currently is hosted on my virtual server. You can turn off usage of the hard coded tracker by specifying
in d2x.ini. Tracker Code
You can find a complete tracker program created by VEX-Munk and written in Perl in the D2X-XL zip file
that is available for download on this site. Surprisingly enough, it goes with the name d2tracker.pl. Testing TrackersTo find out whether a tracker is actually available, you can start two instances of D2X-XL and have one be a game host and the other a client; this works even if both instances run on the same machine. Make sure to run them in windowed mode. You will also need to give the client instance a port number that is different from the one the host is using (default is 28342). If the client instance sees the host in the game list after a short while, the tracker is available.
| |
XML Game Info | |
|
D2X-XL supports external game info queries. It will respond to such queries with XML formatted game information. QueriesQuerying XML game information from D2X-XL game hosts is a two step process:
1. Querying available game hosts from D2X-XL trackers To query XML game info from a game host, a zero-terminated string with the contents "FDescent Game Info Request" must be sent to the game host via UDP (the double quotes must not be sent). D2X-XL will only send up to one XML game info reply per second. Requests coming in faster are dropped. SyntaxXML game info has the following syntax:
Legend(Only items that aren't self-explanatory are described here) Difficulty
Mode
Status
Server
Extensions
State
GraphicsFx
WeaponFx
ShipFx
HUD
RADAR
Controls
GamePlay
|
|
|
|



