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

Re: [pygame] Re: game lobby




On Thursday, Mar 20, 2003, at 15:14 America/New_York, Pete Shinners wrote:

Shandy Brown wrote:
Here's my big idea.  What if, at one extreme, the game(project)
developer didn't have to add ANY lines of code to be supported by the
lobby?  I'm envisioning the lobby as an http server that is accessible
either natively in the game client, or simply via the web through a
browser.
a simple and flexible game lobby would be a huge tool. if we want to get something together fairly quick i think something more like an IRC server would be a good start. each game would connect to a different chat room. then the protocol for each game could be pretty limitless.

a simple client module in python would be easy to create, with functions to connect to the server and channel. get information like who is connected to that channel.

in the end though, i think a full irc server might even be overkill. something that allowed clients to connect and list other connections would be all that is needed. each connection would provide a little extra data like username, gamename, and gameversion. the only other functionality needed would be to send small messages to any of the clients that match any one of those parameters (a connection with the given name and or all connections of a specific game version).

in any event, there is the GGZ project which i've looked at a little closer. it has a big benefit of being up and running. but there are some things i don't totally like, for example the game browser runs as an out of process program on the client.
Any game lobby project for pygame should probably be written with Twisted.. it would make life easier (all the functionality is really already there, including remote object brokering and such), and the asynchronous nature of Twisted interacts really well with pygame. I've even used Twisted's reactor to make pygame programming easier (i.e. reactor.callLater to schedule events and such).

When I find the time, I'll try and post some examples.. maybe I'll whip something up during the twisted sprint next week.

-bob