Need to get custom info from Gnet servers

Blitz3D Forums/Blitz3D Programming/Need to get custom info from Gnet servers

slenkar(Posted 2005) [#1]
How do I get and send info like max players and game type (deathmatch, capture the flag) from Gnet servers?


jfk EO-11110(Posted 2005) [#2]
There are two ways: modify the gnet PHP script the way you need it, or B: use the game name string to hold some numbers or codes that would tell you the game type, max number etc. So your client app can extract the game name and the other infos from one string.

With the "ref" command that will call the Refreshserver function you will be able to update a games name, so it can even hold dynamic data like the current number of players.

This method of one string for all data will save you a lot of headache, just make sure to use one char as a delimiter and make sure all string data won't contain this char.

If you want to make it sabotage proof, you need to add some integrity checks in the php script, like comparing special (non-public) checksums.


slenkar(Posted 2005) [#3]
ah yes thanks I didnt think of that

how do I use the ref command to update the server name string?


jfk EO-11110(Posted 2005) [#4]
I don't know specificly, but I wouldn't reinvent the wheel and instead simply open the FPSNet source and see what jeremy did to refresh a server.