[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Re: game lobby



Hi. I have programmed a full, generalized lobby system using Perl. My idea
was to use it in all the networked games I produced.

It is not fully complete (I'm missing high-score tables and scoring in
general), but game modules can be coded now. The rest of the features
(chatting, registering, game options, command inheritance and
extension, help system, timeouts, etc) are already implemented.

I chose Perl because the language integrates nicely with sub-proceses and
it is easier to code parsers with it.

Actually, it's a game server, because the main idea was to code an engine
that could accept multiple connections and multiplex the user's commands
to the games they are playing. Every game has a perl module that is
dynamicaly loaded, and that module just extends the general commands with
the game-specific commands.

The genral commands are the lobby part: you sign in and can check who's
there, which games are being played and what type of game it is, create a
game of the type the server supports and invite other players, write to
the players in the game, all the players in the server or individual
messages, etc. All the commands have a help system and the whole
"protocol" was coded for both computer and human consumption, so you can
use telnet to test your games if that is possible.

An automatic game inspector could be coded in no time: just log-in, send
the corresponding commands to check the info on all the games and quit. It
could be run by a crontab job to update a web page.

For games requiring faster networking than an ascii-based TCP protocol,
you can code your game module to negotiate a new UDP "connection" with
every player that joins the game, for a fast, binary connection.

The code is here, but I warn you: it's old (Oct. 2002). The latest version
is of January of 2003, with a bunch of features finished, but I got that
at home and I won't be there until Monday. You can still get a good idea
of how the thing works by looking at the code. There is no documentation
yet. Or, you can just run the server and telnet to localhost (don't
remember the port), and just put /help. All commands start with slash (/).

http://www.geocities.com/pupitetris/Code/GameServer-20021001.tgz

This is GPL, of course. It used to be a personal project, so the license
is not on the file, I think, but it is GPL.

My first application for this server was supposed to be a Boggle game, a
very popular game from Parker Brothers:

http://www.centralconnector.com/GAMES/boggle.html

The client would be coded using pygame. I still don't get the time to code
it, but some part of the server side is ready, including word checking
using aspell.

Greetings,
Arturo