Page 1 of 1

Open source generic game lobby library/server?

PostPosted: 29 Oct 2010, 23:59
by smcameron
Hi, my first post on the new board since the old one crashed. Some of you may remember me as the guy that made Word War vi ( http://wordwarvi.sf.net )

Anyway, on to my question. Is there any open source generic game lobby library?

What I envision is a generic game lobby, not specific to any particular game, which has a server side that operates on a well known port, and a client side, which games would use to register their active game-specific servers with these generic game lobby server(s) and then the game-specific clients can connect to these generic game lobby servers to get connection info (ip addr/port/protocol) to the game specific servers.

Make sense? Hope so. Point being that 1) not every game should implement its own lobby (maybe it's own lobby UI, but not the lobby network code) and 2) by having such a widely adopted standard for game lobbies, then even unpopular, obscure games can have good lobby service availability.

Well, perusing the Internet Assigned Numbers Authority, iana.org, I find in the port numbers section, udp/tcp ports 2914 are called "gamelobby", which sounds very promising. But so far I have not found any documentation for the protocol used on these ports, nor mention of libraries that use this port, nor any idea where I might find generic game lobby servers offering service on this port.

Anybody know?

Seems nuts to write yet another (and doubtless insecure) under-served game-specific game lobby, or even an unlikely-to-be-adopted attempt of my own at a generic game lobby protocol and library, as, surely, surely, if anything is sane in this world, one must exist by now already.

Anybody know about this topic? Any pointers?

Thanks,

-- steve

Re: Open source generic game lobby library/server?

PostPosted: 30 Oct 2010, 14:14
by TheAncientGoat

Re: Open source generic game lobby library/server?

PostPosted: 30 Oct 2010, 21:20
by charlie
What about games that already have a lobby? I'm thinking spring-lobby specifically, but I am sure there are more.

http://springlobby.info

Hedgewars has it's own lobby, as does Freeciv. There's also GGZ and other game browsing tools - do they have a lobby?

I definitely think there's scope for some kind of generic lobby, and game platform for FOSS games.

Re: Open source generic game lobby library/server?

PostPosted: 31 Oct 2010, 05:05
by RB[0]
I've had an idea extremely similar to this for GalaxyMage-Redux.
Another person also had a similar idea to create a rather more generic one that would work for about anything. The project is in Python/Pygame, but if they do it correctly it should be really simple to use it from any kind of game as long as they follow the correct protocol.

Re: Open source generic game lobby library/server?

PostPosted: 02 Nov 2010, 03:27
by smcameron
Thanks for the responses...

Well, heh, not seeing anything I liked much, I've gone off all half cocked like an errant Nike missile and decided to "just do it." Probably a mistake, and it's not working yet, but I'm some considerable ways into it, LOL.

{l Code}: {l Select All Code}
[scameron@zuul ssgl]$ ls
AUTHORS   ssgl_connect_to_lobby.c    ssgl.h                    ssgl_sanitize.h  ssgl_socket_io.c
Makefile  ssgl_connect_to_lobby.h    ssgl_recv_game_servers.c  ssgl_server.c    ssgl_socket_io.h
README    ssgl_gameclient_example.c  ssgl_sanitize.c           ssgl_sleep.c
[scameron@zuul ssgl]$ wc *.c *.h
   79   194  1848 ssgl_connect_to_lobby.c
   47   121  1278 ssgl_gameclient_example.c
   55   162  1323 ssgl_recv_game_servers.c
   41   124  1028 ssgl_sanitize.c
  355  1081  9209 ssgl_server.c
   27    68   404 ssgl_sleep.c
   57   174  1001 ssgl_socket_io.c
   14    20   246 ssgl_connect_to_lobby.h
   51   148  1298 ssgl.h
   13    21   239 ssgl_sanitize.h
   17    43   365 ssgl_socket_io.h
  756  2156 18239 total
[scameron@zuul ssgl]$ make
gcc -g --pedantic -Wall -Werror -pthread -c ssgl_sanitize.c
gcc -g --pedantic -Wall -Werror -pthread -c ssgl_sleep.c
gcc -g --pedantic -Wall -Werror -pthread -c ssgl_socket_io.c
gcc -g --pedantic -Wall -Werror -pthread ssgl_sanitize.o ssgl_sleep.o ssgl_socket_io.o -o ssgl_server ssgl_server.c
gcc -g --pedantic -Wall -Werror -pthread -c ssgl_recv_game_servers.c
gcc -g --pedantic -Wall -Werror -pthread -c ssgl_connect_to_lobby.c
ar -cr libssglclient.a ssgl_sleep.o ssgl_sanitize.o ssgl_recv_game_servers.o \
                ssgl_connect_to_lobby.o ssgl_socket_io.o
gcc -g --pedantic -Wall -Werror -pthread -L. -o ssgl_gameclient_example ssgl_gameclient_example.c -lssglclient
[scameron@zuul ssgl]$


Quite likely I'm wasting my time, but it's been a while since I've done any network programming and I needed a refresher anyway, and it makes for an interesting little project even if it doesn't pan out. If anything useful comes of it, I will let you guys know.

Oh yeah, the "ssgl" prefix you see on everything there is for "Super Simple Game Lobby". It aims to be "super simple" in that it should be very easy to add support (just a few lines of C) for this kind of lobby to a game, and in that it doesn't do *anything* except the lobby/network code For example,. it does not try to be a chat server, nor understand any existing lobby protocols, etc. It also doesn't provide *any* of the UI, just the network code and that's it. I figure almost all games tend to have a custom UI anyhow, so some generic UI would look out of place in most any game, so not much point in making a UI as part of such a library.

Chose C because it's my favorite, and because it makes for good library interfaces that work easily with other languages.

Linux only, for a start, though the protocol itself should be neutral (taking care not to assume endianness or sizes of types and the basic crap like that) and small enough that porting shouldn't be very hard.

Not that any of this matters since I don't quite have working code yet.

-- steve

Re: Open source generic game lobby library/server?

PostPosted: 02 Nov 2010, 18:00
by Sindwiller
It's cool that you've started something (even if it is small as it is) and that you keep us posted. The guys here who are more into network programming might want to have a look at what you're developing, too, once it has been formed to an extent. The effort is definitely worth a bunch for future projects, so it will pay off later on. :)

Re: Open source generic game lobby library/server?

PostPosted: 03 Nov 2010, 05:15
by smcameron
I've put *barely* working code here:

git://github.com/smcameron/ssgl.git
https://github.com/smcameron/ssgl

would not advise anyone attempting to actually use it at this time, quite surely it's buggy, and I'll probably change things (like, game servers will probably update the lobby via udp, not tcp, better filtering for lobby clients, lobby clients won't have to do their own looping to keep the server updated, or get updates from the lobby, etc.) And there's debug code in there, and the lobby server doesn't bother to daemonize itself, etc.

But, the core of it works -- which is to say game servers can inform the lobbyserver of their presence, and game clients can obtain the list of game servers, and if game servers disappear, the lobby notices (eventually) and removes them from the list.

-- steve

Re: Open source generic game lobby library/server?

PostPosted: 31 May 2011, 00:51
by Texrat
Hello Steve (and others)!

I found this thread via search on "open gaming lobby". As a community advocate for Linux-based MeeGo (http://meego.com), and gaming enthusiast, I'm highly interested in this topic. I know the guys behind the gluon gaming engine effort, as well as many developers who would be interested in this sort of endeavor.

I have registered xlobby.org and xlobby.net as a start, and plan to start pulling people together. Steve, if you want to keep the lead on this I certainly don't mind backing you up! Let's join forces and make this happen!

Re: Open source generic game lobby library/server?

PostPosted: 31 May 2011, 19:34
by oln
Almost forgot about this thread.
This would be useful for a lot of games, and I would be interested in doing some work on this if there is a need for it.

Re: Open source generic game lobby library/server?

PostPosted: 06 Aug 2013, 23:38
by Lyberta
Deleted.

Re: Open source generic game lobby library/server?

PostPosted: 07 Aug 2013, 02:22
by Evropi
What a necro.