I've read that people are looking for a lobby server for their Versus compo games, to allow players to find running servers. Since our own lobby service at ganggarrison.com is rather bored, I'd like to offer everyone to use it for their Versus compo game. It has a "protocol id" mechanism that will only show servers to clients with the same id, so it can be used for several games (and several incompatible versions of the same game) without a problem.
I'm offering this only for this compo - if your game remains popular for months, with more than a dozen servers or so online at once, please try to find your own solution instead. I can give you the source code and jar file for the lobby. It could be helpful if you don't point to ganggarrison.com directly, but use a dynamic dns service, so that you have the option to switch to your own lobby server later without changing the game.
If you want to use this please post here with the unique ID of your game, so that I have some overview in case things get out of hand. The ID should be randomly generated, e.g. with a random UUID generator. If you want to, you can
donate to help us cover our server costs.
Now, how do you use this mysterious lobby? When you have a game server running, it should send a UDP packet to the lobby (ganggarrison.com, port 29942) every 30 seconds with the following content:
#Bytes Meaning
6 Magic Numbers which have to go at the start of every registration packet: 4, 8, 15, 16, 23, 42
1 Lobby protocol version: 128
16 Game Protocol ID. Clients will only see servers with the same Protocol ID.
2 The port number the game server is running on (Little endian, i.e. least significant byte first)
1 Length of the server name
0-255 Server name
On registration, the lobby checks whether the game server is actually reachable by starting a TCP connection to the given port and instantly closing it again. That means your game should be able to ignore connections where nothing is sent. If the connection succeeds, the game server is added to the server list where it will remain for 60 seconds. That timer will be reset with the next registration packet. The server name may differ between registrations, so you can update the description.
Clients will use the lobby by opening a TCP connection (again on port 29942). They have to send a byte with the lobby protocol version(128), followed by the 16 byte Game Protocol ID. The lobby will then reply with a list of servers in this format:
#Bytes Meaning
1 Number of servers in the list
For every server
1 Length of the server name
0-255 Server name
4 Server IP
2 Server port (Little endian, i.e. least significant byte first)
Have fun