DescentDevelopers / Descent3

Descent 3 by Outrage Entertainment
GNU General Public License v3.0
2.88k stars 251 forks source link

Gamespy protocol missing #541

Open ccfly42 opened 3 months ago

ccfly42 commented 3 months ago

Hello, it looks like the gamespy protocol has not been implemented or has been removed from the original source.

It is currently implemented in the piccu version but not in the 1.5 release.

I know that developments towards PXO are underway, but I would ask that gamespy compatibility be restored to prevent a single point of failure. This has proven useful in the past.

I am happy to answer any questions you may have about the protocol. I am also happy to test the implementation.

Thank you!

JeodC commented 3 months ago

Note: Piccu integrated with https://github.com/InsanityBringer/PiccuEngine/pull/46

Lgt2x commented 3 months ago

Hey, to be honest I did not think gamespy was still a thing people used, and could not find out how to use it, so it's been removed from the game. I have nothing against enabling it again, although I have no idea how to effectively test it. Where can I find documentation about the protocol? What servers are still online?

ccfly42 commented 3 months ago

Hi,

as far as I know, gamespy has stopped operating. However, the descent3 community already provided its own trackers during the PXO era to avoid PXO's downtimes. These are currently being used by around 40 servers.

Gamespy is needed so that Descent3 sends a heartbeat via udp when a server starts (around every 5 minutes as far as I know). The trackers can be configured in the Gamespy.cfg. (small bug: only 4 or 5 entries are possible).

Current trackers that use gamespy:

d3.descent.cx/tracker.d3 tsetsefly.de (aka descentservers.net)

And tools which use the trackers & the gamespy protocol for queries, e.g. Vortex, Qstat

Format for the gamespy.cfg:

 0 
domain:port

line 1. is the code of a region, but is no longer used nowadays and remains at 0 line 2. is self-explanatory.

Examples of the cfg can be found here, further down in the topic the region codes are also listed: https://www.descentbb.net/viewtopic.php?t=10539

Documentation:

I couldn't find any good documentation for the protocol quickly. A short overview can be found at https://www.tiberiantechnologies.org/Docs/?page=GameSpy%20Protocol%20and%20New%20Broadcaster

How to test:

For simple testing, quakestat (qstat) can be used. Since quakestat only sends the "\status\" query, only a rudimentary test can be done.

#> quakestat -R -d3g 127.0.0.1:20142
ADDRESS PLAYERS MAP RESPONSE TIME NAME
D3G 127.0.0.1 1/7 0/0 fury.mn3 18 / 0 Anarchy testn14
gamename=descent3,gamever=Retail 1.4.0,location=0,hostport=2092,gametype=Anarchy,gamemode=openplaying,teamplay=1,timelimit=0,fraglimit=0,cl_pxotrack=0,mouselook=0,permissable=0,brightships=0,acccollisions=0,randpowerup=1
#> quakestat -P -d3g 172.30.2.50:20142 
ADDRESS           PLAYERS      MAP   RESPONSE TIME    NAME
D3G  172.30.2.50            1/7   0/0  fury.mn3      1 / 0  Anarchy testn14
      0 frags   0 deaths team#-1      0ms -Server-

Is netstat or similar available: The heartbeat can be tested by configuring a local address in the gamespy.cfg and listening on the port.

#> nc -lu 27900 
\heartbeat\20142\gamename\descent3\heartbeat\20142\gamename\descent3 

Queries:

#> echo "\\basic\\" | nc -4u -w1 127.0.0.1 20142
\gamename\descent3\gamever\Retail 1.4.0\location\0\final\\queryid\2.1
#> echo "\\info\\" | nc -4u -w1 127.0.0.1 20142
\hostname\testn14\hostport\2092\mapname\fury.mn3\gametype\Anarchy\numplayers\1\maxplayers\7\gamemode\openplaying\final\\queryid\3.1
#> echo "\\rules\\" | nc -4u -w1 127.0.0.1 20142
\teamplay\1\timelimit\0\fraglimit\0\cl_pxotrack\0\mouselook\0\permissable\0\brightships\0\acccollisions\0\randpowerup\1\final\\queryid\4.1
#> echo "\\players\\" | nc -4u -w1 127.0.0.1 20142
\player_0\-Server-\frags_0\0\deaths_0\0\team_0\-1\ping_0\0\final\\queryid\5.1

#> echo "\\status\\" | nc -4u -w1 127.0.0.1 20142
\gamename\descent3\gamever\Retail 1.4.0\location\0\hostname\testn14\hostport\2092\mapname\fury.mn3\gametype\Anarchy\numplayers\1\maxplayers\7\gamemode\openplaying\teamplay\1\timelimit\0\fraglimit\0\cl_pxotrack\0\mouselook\0\permissable\0\brightships\0\acccollisions\0\randpowerup\1\player_0\-Server-\frags_0\0\deaths_0\0\team_0\-1\ping_0\0\final\\queryid\6.1
DAK404 commented 3 months ago

There is an open source version of GameSpy called OpenSpy (https://github.com/openspy)

There is a client version on GitHub which helps in enabling OpenSpy for older titles (https://github.com/anzz1/openspy-client)

This might help in re-enabling GameSpy multiplayer.

Lgt2x commented 3 months ago

Thanks for the investigation work! I think we now have all the information required to resurrect gamespy. This would be a very welcome contribution.

KynikossDragonn commented 3 months ago

There's also a GameSpy protocol based master server hosted over at https://333networks.com/ that has so far worked fine for Unreal Engine 1 games and such.

I had no idea Descent 3 even had GameSpy support whatsoever; I guess it was from the Macintosh port judging by the filename of the source file listed?

JeodC commented 2 months ago

Close with merge of #556

Lgt2x commented 2 months ago

Close with merge of #556

Not yet, still some features missing

JeodC commented 2 months ago

Close with merge of #556

Not yet, still some features missing

Aye, thought the pr just missed linking with issue. Carry on!